/* Flooring & Underlayment Waste Calculator — content styles. Prefix: --fl- */

:root {
  --fl-surface: #ffffff;
  --fl-panel:   #faf8f7;
  --fl-line:    #ebe5e4;
  --fl-text:    #1f191a;
  --fl-muted:   #6e6263;
  --fl-brand:   #a04a1e;
  --fl-ok:      #1b7340;
  --fl-warn:    #b45309;
}

.fl-main {
  padding-block: 1.5rem 3rem;
}

.fl-wrap {
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.fl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.25fr);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 48rem) {
  .fl-grid {
    grid-template-columns: 1fr;
  }
}

.fl-panel {
  background: var(--fl-panel);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  padding: 1.25rem;
}

.fl-section-title {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-muted);
  margin: 0 0 1rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--fl-line);
}

.fl-unit-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  background: var(--fl-surface);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  padding: 0.25rem;
  margin-bottom: 1rem;
}

.fl-unit-btn {
  padding: 0.45rem 0.5rem;
  font-size: 0.775rem;
  font-weight: 600;
  background: transparent;
  color: var(--fl-muted);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  text-align: center;
}

.fl-unit-btn.fl-unit-active {
  background: var(--tf-accent);
  color: #ffffff;
}

.fl-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

@media (max-width: 32rem) {
  .fl-row-2 {
    grid-template-columns: 1fr;
  }
}

.fl-field {
  margin-bottom: 0.85rem;
}

.fl-field label {
  display: block;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--fl-text);
  margin-bottom: 0.35rem;
}

.fl-field select,
.fl-field input[type="number"] {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--fl-text);
  background: var(--fl-surface);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  box-sizing: border-box;
}

.fl-field select:focus,
.fl-field input[type="number"]:focus {
  outline: none;
  border-color: var(--tf-accent);
}

.fl-action-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.fl-btn-primary {
  flex: 1;
  padding: 0.75rem 1rem;
  background: var(--tf-accent);
  color: #ffffff;
  border: none;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.fl-btn-primary:hover {
  background: var(--tf-accent-hover);
}

.fl-btn-ghost {
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--fl-muted);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.fl-btn-ghost:hover {
  color: var(--fl-text);
  background: var(--fl-panel);
}

/* Results section */
.fl-results {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.fl-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

@media (max-width: 32rem) {
  .fl-hero-grid {
    grid-template-columns: 1fr;
  }
}

.fl-hero-card {
  background: var(--fl-surface);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  padding: 1.15rem;
}

.fl-hero-primary {
  border-top: 3px solid var(--tf-accent);
}

.fl-hero-secondary {
  border-top: 3px solid var(--fl-muted);
}

.fl-hero-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.fl-hero-label {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-muted);
}

.fl-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 2px;
  background: color-mix(in srgb, var(--tf-accent) 15%, transparent);
  color: var(--tf-accent);
  border: 1px solid color-mix(in srgb, var(--tf-accent) 30%, transparent);
}

.fl-hero-val {
  font-size: 2.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
  color: var(--fl-text);
  margin-bottom: 0.35rem;
}

.fl-hero-sub {
  font-size: 0.75rem;
  color: var(--fl-muted);
  line-height: 1.35;
}

.fl-breakdown-card {
  background: var(--fl-panel);
  border: 1px solid var(--fl-line);
  border-radius: 2px;
  padding: 1rem;
}

.fl-card-title {
  font-size: 0.825rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fl-muted);
  margin: 0 0 0.65rem 0;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--fl-line);
}

.fl-spec-table {
  display: flex;
  flex-direction: column;
}

.fl-spec-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  padding: 0.35rem 0;
  color: var(--fl-muted);
}

.fl-spec-row strong {
  font-weight: 600;
  color: var(--fl-text);
  font-variant-numeric: tabular-nums;
}

.fl-spec-total {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--fl-line);
  color: var(--fl-text);
}

.fl-spec-total strong {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--tf-accent);
}

.fl-ad {
  overflow: hidden;
  min-height: 280px;
  margin: 2rem auto;
  text-align: center;
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --fl-surface: var(--tf-surface);
  --fl-panel: var(--tf-surface);
  --fl-line: var(--tf-surface);
  --fl-text: var(--tf-ink);
  --fl-muted: var(--tf-ink-soft);
  --fl-brand: #d99d7e;
  --fl-ok: #59cf8b;
  --fl-warn: #d9a57d;
}
