/* ============================================================
   Espresso Companion — companion tools styling
   Palette espresso: accent ambra #d4a24e, sfondo #1a120b.
   ============================================================ */

.esp-tool {
  scroll-margin-top: 90px;
  margin: 2.2rem 0;
  padding: 1.6rem 1.6rem 1.8rem;
  border-radius: 16px;
  border: 1px solid rgba(212, 162, 78, 0.22);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(212, 162, 78, 0.07), transparent 55%),
    rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(6px);
}

.esp-tool-head {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}

.esp-tool-icon {
  font-size: 1.8rem;
  line-height: 1;
  filter: drop-shadow(0 2px 8px rgba(212, 162, 78, 0.3));
}

.esp-tool-title {
  margin: 0 0 0.25rem !important;
  font-size: 1.25rem !important;
  color: #f2ead9;
}

.esp-tool-desc {
  margin: 0;
  color: #a3927b;
  font-size: 0.92rem;
  line-height: 1.5;
}

/* ---- form controls ---- */
.esp-input {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 162, 78, 0.28);
  background: rgba(21, 16, 10, 0.6);
  color: #f2ead9;
  font-size: 0.95rem;
  font-family: inherit;
  margin: 0.35rem 0 0.9rem;
}

.esp-input:focus {
  outline: none;
  border-color: #d4a24e;
  box-shadow: 0 0 0 3px rgba(212, 162, 78, 0.15);
}

select.esp-input { margin-top: 0.35rem; }

.esp-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.6rem;
}

.esp-fields label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: #a3927b;
  letter-spacing: 0.02em;
}

.esp-actions { margin-top: 0.4rem; }

.esp-btn {
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  border: 1px solid #d4a24e;
  background: rgba(212, 162, 78, 0.12);
  color: #d4a24e;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, box-shadow 0.25s;
}

.esp-btn:hover {
  background: #d4a24e;
  color: #15100a;
  box-shadow: 0 4px 18px rgba(212, 162, 78, 0.35);
}

/* ---- results ---- */
.esp-tool-result {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(212, 162, 78, 0.14);
}

.esp-tool-result p {
  margin: 0.45rem 0;
  line-height: 1.6;
}

.esp-hint {
  color: #8a7a63 !important;
  font-size: 0.85rem !important;
}

.esp-ok { color: #7fc98f !important; }

.esp-warn {
  color: #ffb457 !important;
  background: rgba(255, 180, 87, 0.08);
  border-left: 3px solid #ffb457;
  padding: 0.6rem 0.9rem;
  border-radius: 0 8px 8px 0;
}

/* gear list (filter tools) */
.esp-gear-list {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.45rem;
}

.esp-gear-list li {
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: rgba(212, 162, 78, 0.05);
  border: 1px solid rgba(212, 162, 78, 0.14);
  font-size: 0.9rem;
}

.esp-gear-list em { color: #8a7a63; font-size: 0.82rem; }

/* reference tables */
.esp-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.8rem;
  font-size: 0.92rem;
}

.esp-table th,
.esp-table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(212, 162, 78, 0.12);
}

.esp-table thead th {
  color: #d4a24e;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.esp-table tbody tr:hover { background: rgba(212, 162, 78, 0.04); }

/* espresso timer */
.esp-timer-display {
  font-family: "Fraunces", Georgia, serif;
  font-size: 3.2rem;
  font-weight: 600;
  text-align: center;
  color: #f2ead9;
  margin: 0.4rem 0;
  font-variant-numeric: tabular-nums;
}

.esp-timer-display.esp-timer-bloom { color: #e8c47c; }
.esp-timer-display.esp-timer-target { color: #d4a24e; }

.esp-timer-milestones {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  font-size: 0.8rem;
  color: #8a7a63;
  margin-top: 0.4rem;
}

.esp-timer-milestones .on { color: #7fc98f; }

/* disclosure */
.esp-affiliate-disclosure {
  margin-top: 2.2rem;
  padding: 0.9rem 1.1rem;
  border-radius: 10px;
  background: rgba(212, 162, 78, 0.05);
  border-left: 3px solid rgba(212, 162, 78, 0.6);
  color: #a3927b;
  font-size: 0.85rem;
  line-height: 1.6;
}

.esp-affiliate-link {
  color: #d4a24e;
  border-bottom: 1px dashed rgba(212, 162, 78, 0.5);
  transition: border-color 0.2s, color 0.2s;
}

.esp-affiliate-link:hover {
  color: #e8c47c;
  border-bottom-style: solid;
}
