/* Zakat Calculator - Content Area Styles
   Palette per knowledge/design-registry.md: a dignified, classical Islamic
   financial ledger — deep forest green, warm gold accent, parchment ground,
   serif display headings against a clean tabular-figures sans for numbers. */
:root {
  --zkc-bg: #faf8f4;
  --zkc-surface: #f4f0e6;
  --zkc-card: #ffffff;
  --zkc-border: #e5e0d4;
  --zkc-line: #e5e0d4;
  --zkc-ink: #19201d;
  --zkc-ink-soft: #4b5a52;
  --zkc-ink-faint: #8a9089;
  --zkc-primary: #1b4332;
  --zkc-primary-hover: #2d6a4f;
  --zkc-green: #2d6a4f;
  --zkc-gold: #c0902c;
  --zkc-warn: #b45309;
  --zkc-warn-bg: #fef3c7;
  --zkc-radius: 8px;
  --zkc-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  --zkc-font-display: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
}

.zkc-main {
  width: 100%;
  color: var(--zkc-ink);
  background: var(--zkc-bg);
}

.zkc-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Controls bar */
.zkc-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--zkc-surface);
  border: 1px solid var(--zkc-line);
  border-radius: var(--zkc-radius);
}

.zkc-control-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zkc-control-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zkc-ink-soft);
}

/* Panels */
.zkc-panel {
  background: var(--zkc-card);
  border: 1px solid var(--zkc-line);
  border-radius: var(--zkc-radius);
  box-shadow: var(--zkc-shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.zkc-nisab-panel,
.zkc-form-panel,
.zkc-results-panel {
  position: relative;
}

.zkc-panel-title {
  font-family: var(--zkc-font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--zkc-primary);
}

.zkc-stat-grid {
  margin-top: 16px;
}

.zkc-ad {
  overflow: hidden;
  min-height: 280px;
}

/* Grids */
.zkc-grid {
  display: grid;
  gap: 16px;
}

.zkc-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.zkc-grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.zkc-grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.zkc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zkc-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--zkc-ink);
}

.zkc-hint {
  font-size: 0.75rem;
  color: var(--zkc-ink-soft);
}

.zkc-hint.is-warn {
  color: var(--zkc-warn);
  font-weight: 600;
}

.zkc-input-wrap {
  display: flex;
  align-items: center;
  position: relative;
}

.zkc-input,
.zkc-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.875rem;
  color: var(--zkc-ink);
  background: var(--zkc-card);
  border: 1px solid var(--zkc-line);
  border-radius: var(--zkc-radius);
  font-family: inherit;
  box-sizing: border-box;
}

.zkc-input:focus,
.zkc-select:focus {
  outline: 2px solid var(--zkc-primary);
  border-color: var(--zkc-primary);
}

.zkc-unit {
  position: absolute;
  right: 12px;
  font-size: 0.8125rem;
  color: var(--zkc-ink-soft);
  pointer-events: none;
}

.zkc-curr-prefix {
  position: absolute;
  left: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--zkc-ink-soft);
  pointer-events: none;
}

.zkc-curr-prefix + .zkc-input {
  padding-left: 22px;
}

/* Buttons */
.zkc-action-bar {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.zkc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--zkc-radius);
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.15s ease;
  background: var(--zkc-primary);
  color: #ffffff;
}

.zkc-btn-primary {
  background: var(--zkc-primary);
  color: #ffffff;
}

.zkc-btn-primary:hover {
  background: var(--zkc-primary-hover);
}

.zkc-btn-secondary {
  background: var(--zkc-surface);
  color: var(--zkc-ink);
  border-color: var(--zkc-line);
}

.zkc-btn-secondary:hover {
  background: var(--zkc-card);
  border-color: var(--zkc-ink);
}

/* Hero Summary */
.zkc-summary-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.zkc-hero-card {
  padding: 20px;
  border: 1px solid var(--zkc-line);
  border-radius: var(--zkc-radius);
  background: var(--zkc-surface);
  box-shadow: var(--zkc-shadow);
}

.zkc-hero-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--zkc-ink-soft);
  margin-bottom: 6px;
}

.zkc-hero-value {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--zkc-primary);
  margin-bottom: 6px;
  font-variant-numeric: tabular-nums;
}

.zkc-hero-sub {
  font-size: 0.8125rem;
  color: var(--zkc-ink-soft);
}

/* The headline "Total Zakat Due" figure gets the warm gold accent per the
   design registry — every other numeral stays the forest-green primary. */
#zkcTotalZakatVal {
  color: var(--zkc-gold);
}

/* Stat Box */
.zkc-stat-box {
  padding: 14px;
  background: var(--zkc-card);
  border: 1px solid var(--zkc-line);
  border-radius: var(--zkc-radius);
  box-shadow: var(--zkc-shadow);
}

.zkc-stat-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--zkc-ink-soft);
  margin-bottom: 4px;
}

.zkc-stat-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--zkc-ink);
  font-variant-numeric: tabular-nums;
}

.zkc-stat-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--zkc-ink-soft);
  margin-top: 2px;
}

/* Callout */
.zkc-callout {
  margin-top: 20px;
  padding: 16px;
  background: var(--zkc-surface);
  border-left: 3px solid var(--zkc-primary);
  border-radius: 0 var(--zkc-radius) var(--zkc-radius) 0;
}

.zkc-callout.is-exempt {
  background: var(--zkc-warn-bg);
  border-left-color: var(--zkc-warn);
}

.zkc-callout-title {
  font-family: var(--zkc-font-display);
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 4px 0;
  color: var(--zkc-ink);
}

.zkc-callout-text {
  font-size: 0.8125rem;
  line-height: 1.5;
  margin: 0;
  color: var(--zkc-ink-soft);
}

@media (max-width: 640px) {
  .zkc-controls-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .zkc-control-group {
    justify-content: space-between;
  }
}

/* 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"] {
  --zkc-bg: var(--tf-surface);
  --zkc-surface: var(--tf-surface);
  --zkc-card: var(--tf-surface);
  --zkc-border: #c2b699;
  --zkc-line: #c2b699;
  --zkc-ink: var(--tf-ink);
  --zkc-ink-soft: var(--tf-ink-soft);
  --zkc-ink-faint: var(--tf-ink-faint);
  --zkc-primary: var(--tf-ink);
  --zkc-primary-hover: #6ec29d;
  --zkc-green: #6ec29d;
  --zkc-gold: #dabd81;
  --zkc-warn: #d9a57d;
  --zkc-warn-bg: var(--tf-surface);
}
