/*
 * BT Kitchen Tools — brand styles for Butter & Thyme.
 * Sage #A3B899 and deep thyme #4F6B45 (from the logo mark), butter
 * accent #F0C75E, cream card #FBF7EE, warm brown ink #40342A.
 * Headings: "Fraunces" (Georgia fallback). Body: "Nunito Sans"
 * (system fallback). The two font stacks live in the variables below
 * so they can be pointed at the theme's fonts in one line.
 * Mobile-first: most visitors arrive from Facebook on a phone.
 * Sizing is container-relative only — no viewport units for tool elements.
 */

.bt-tool {
  --bt-head-font: "Fraunces", Georgia, "Times New Roman", serif;
  --bt-body-font: "Nunito Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
  background: #FBF7EE;
  color: #40342A;
  font-family: var(--bt-body-font);
  width: 100%;
  max-width: 640px;
  margin: 0 auto 24px;
  padding: 20px 16px 24px;
  border: 2px solid #4F6B45;
  border-radius: 14px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-x: clip;
  overflow-wrap: break-word;
}

.bt-tool *,
.bt-scaler-bar * { box-sizing: border-box; }

.bt-tool [hidden] { display: none !important; }

.bt-tool-title {
  font-family: var(--bt-head-font);
  font-weight: 700;
  color: #40342A;
  font-size: 1.6rem;
  margin: 0 0 4px;
  text-align: center;
}

.bt-tool-sub {
  text-align: center;
  margin: 0 0 16px;
  color: #7A6A58;
  font-size: 0.95rem;
  font-style: italic;
}

.bt-tool-note {
  margin: 14px 0 0;
  color: #7A6A58;
  font-size: 0.85rem;
  font-style: italic;
  text-align: center;
}

.bt-btn {
  display: inline-block;
  background: #4F6B45;
  color: #FBF7EE;
  border: none;
  border-radius: 10px;
  padding: 12px 20px;
  min-height: 48px;
  font-family: var(--bt-body-font);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.bt-btn:hover, .bt-btn:focus { background: #3D5535; }

.bt-btn-big {
  font-size: 1.15rem;
  padding: 14px 28px;
  width: 100%;
}

.bt-input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  font-size: 1rem;
  font-family: var(--bt-body-font);
  color: #40342A;
  background: #FFFFFF;
  border: 2px solid #A3B899;
  border-radius: 10px;
}

.bt-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #4F6B45;
  margin: 0 0 6px;
}

/* ---- Converter ---- */

.bt-conv-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.bt-conv-cell { flex: 1 1 0; min-width: 0; }

.bt-conv-swap { flex: 0 0 auto; padding: 12px 14px; font-size: 1.1rem; }

.bt-conv-result {
  margin: 16px 0 4px;
  font-family: var(--bt-head-font);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  color: #40342A;
}

.bt-conv-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 0.95rem;
}

.bt-conv-table th,
.bt-conv-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #E3DCC8;
  text-align: left;
}

.bt-conv-table th {
  color: #4F6B45;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bt-conv-table td:last-child,
.bt-conv-table th:last-child { text-align: right; }

/* ---- Dinner spinner ---- */

.bt-dinner-spinner { text-align: center; }

.bt-spin-display {
  font-family: var(--bt-head-font);
  font-size: 1.4rem;
  font-weight: 700;
  min-height: 2.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 14px;
  padding: 10px;
  background: #FFFFFF;
  border: 2px dashed #A3B899;
  border-radius: 10px;
}

.bt-spin-display.bt-spinning { border-color: #F0C75E; }

.bt-spin-card {
  margin-top: 16px;
  padding: 16px;
  background: #FFFFFF;
  border: 2px solid #F0C75E;
  border-radius: 12px;
}

.bt-spin-card-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #4F6B45;
}

.bt-spin-title {
  font-family: var(--bt-head-font);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 4px;
}

.bt-spin-meta { margin: 0 0 14px; color: #7A6A58; font-size: 0.92rem; }

/* ---- Recipe scaler ---- */

.bt-scaler-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  background: #FBF7EE;
  border: 2px solid #A3B899;
  border-radius: 10px;
  font-family: "Nunito Sans", -apple-system, "Segoe UI", Roboto, sans-serif;
}

.bt-scaler-label {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4F6B45;
}

.bt-scale-btn {
  min-height: 48px;
  min-width: 56px;
  padding: 10px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: #4F6B45;
  background: #FFFFFF;
  border: 2px solid #4F6B45;
  border-radius: 10px;
  cursor: pointer;
}

.bt-scale-btn.bt-active { background: #4F6B45; color: #FBF7EE; }
