/* ============================================================
   CenterPoint Title Fee Calculator — Refined Aesthetic
   Palette: Warm cream (#F5F0E8), Deep charcoal (#1C1C1A), 
            Antique gold (#BEAD96), Warm tan (#C8BAA0)
   Typography: Cormorant Garamond (display) + Jost (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500&display=swap');

:root {
  --cream:      #F5F0E8;
  --cream-dark: #EDE6D8;
  --tan:        #C8BAA0;
  --gold:       #BEAD96;
  --gold-deep:  #A89878;
  --charcoal:   #1C1C1A;
  --panel:      #D0C2AC;
  --warm-mid:   #4A4540;
  --muted:      #8A837A;
  --white:      #FDFAF5;
  --error:      #8B3A3A;
}

/* ── Layout ────────────────────────────────────────────────── */

.tfc-container {
  display: flex;
  gap: 48px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px 60px;
  align-items: flex-start;
  font-family: 'Jost', sans-serif;
  color: var(--charcoal);
}

.tfc-form-column {
  flex: 0 0 420px;
  width: 420px;
}

.tfc-results-column {
  flex: 1;
  min-height: 420px;
  width: 0;
}

@media (max-width: 860px) {
  .tfc-container {
    flex-direction: column;
    gap: 32px;
  }
  .tfc-form-column,
  .tfc-results-column {
    flex: unset;
    width: 100%;
  }
}

/* ── Card (form wrapper) ───────────────────────────────────── */

.tfc-card {
  background: var(--white);
  padding: 40px 36px 44px;
  position: sticky;
  top: 24px;
  border: 1px solid var(--tan);
  box-shadow: 0 2px 32px rgba(28,28,26,0.06);
}

.tfc-card::before {
  content: 'FEE CALCULATOR';
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.25em;
  color: var(--muted);
  margin-bottom: 20px;
}

/* ── Form Labels ───────────────────────────────────────────── */

.tfc-card label {
  display: block;
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm-mid);
  margin-bottom: 8px;
  margin-top: 20px;
}

/* ── Inputs & Selects ──────────────────────────────────────── */

.tfc-card input[type="number"],
.tfc-card select {
  width: 100%;
  padding: 12px 14px;
  background: var(--cream);
  border: 1px solid transparent;
  border-bottom: 1px solid var(--tan);
  font-family: 'Jost', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--charcoal);
  margin-bottom: 4px;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
  outline: none;
}

.tfc-card select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23BEAD96' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

.tfc-card input:focus,
.tfc-card select:focus {
  outline: none;
  border-color: var(--gold);
  background: var(--white);
}

/* ── State / County row ────────────────────────────────────── */

.tfc-card .state-county-row {
  display: flex;
  gap: 16px;
  margin-top: 0;
}

.tfc-card .state-county-row .form-group {
  flex: 1;
}

.tfc-card .state-county-row label {
  margin-top: 0;
}

/* ── Submit Button ─────────────────────────────────────────── */

.tfc-card button[type="submit"] {
  display: block;
  width: 100%;
  background: var(--charcoal);
  color: var(--cream);
  border: none;
  padding: 15px 24px;
  margin-top: 32px;
  font-family: 'Jost', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

.tfc-card button[type="submit"]:hover {
  background: var(--gold-deep);
  color: var(--white);
}

/* ── Info Box (pre-result state) ───────────────────────────── */

.tfc-info-box {
  background: var(--panel);
  padding: 36px 32px;
  color: var(--cream);
  border: none;
  margin: 0;
}

.tfc-info-box h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 400;
  font-style: italic;
  color: white;
  margin: 0 0 16px;
  letter-spacing: 0.01em;
  line-height: 1.3;
}

.tfc-info-box p {
  font-size: 16px;
  font-weight: 300;
  color: white;
  margin: 0 0 10px;
  line-height: 1.7;
}

.tfc-info-box ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
}

.tfc-info-box ul li {
  font-size: 15px;
  font-weight: 300;
  color: white;
  padding: 8px 0;
  border-bottom: 1px solid rgba(28,28,26,0.12);
  letter-spacing: 0.04em;
}

.tfc-info-box ul li:last-child {
  border-bottom: none;
}

.tfc-info-box a {
  display: inline-block;
  margin-top: 15px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-deep);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-deep);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}

.tfc-info-box a:hover {
  color: var(--charcoal);
  border-color: var(--charcoal);
}

/* ── Loading ───────────────────────────────────────────────── */

.tfc-loading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 40px 0;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.tfc-loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border: 1px solid var(--tan);
  border-top-color: var(--gold-deep);
  border-radius: 50%;
  animation: tfc-spin 0.9s linear infinite;
  flex-shrink: 0;
}

@keyframes tfc-spin {
  to { transform: rotate(360deg); }
}

/* ── Error ─────────────────────────────────────────────────── */

.tfc-error {
  padding: 20px 24px;
  background: #faf5f5;
  border-left: 3px solid var(--error);
  color: var(--error);
  font-size: 13px;
  font-weight: 300;
  margin-top: 20px;
}

/* ── Results ───────────────────────────────────────────────── */

.tfc-results {
  font-family: 'Jost', sans-serif;
  animation: tfc-fadeIn 0.45s ease;
}

@keyframes tfc-fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Results headline */
.tfc-results > h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 400;
  font-style: italic;
  color: var(--charcoal);
  margin: 0 0 28px;
  letter-spacing: 0.01em;
  line-height: 1.25;
}

/* Section divider labels */
.tfc-results .section-title {
  font-family: 'Jost', sans-serif;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 8px;
  margin: 30px 0 14px;
  background: none;
  border-bottom: 1px solid var(--tan);
  color: var(--muted);
}

/* ── Summary block ─────────────────────────────────────────── */

.tfc-summary {
  background: var(--cream-dark);
  padding: 22px 24px;
  margin-bottom: 8px;
}

.tfc-summary p {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(200,186,160,0.35);
  color: var(--warm-mid);
}

.tfc-summary p:last-child {
  border-bottom: none;
}

.tfc-summary p strong {
  font-weight: 500;
  color: var(--charcoal);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── Fee Tables ─────────────────────────────────────────────── */

.tfc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 6px;
  background: var(--white);
  border: 1px solid var(--cream-dark);
}

.tfc-table tr {
  border-bottom: 1px solid var(--cream-dark);
}

.tfc-table tr:last-child {
  border-bottom: none;
}

.tfc-table tr:nth-child(even) {
  background: var(--cream);
}

.tfc-table td {
  padding: 11px 16px;
  font-size: 13px;
  font-weight: 300;
  color: var(--warm-mid);
}

.tfc-table td:last-child {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--charcoal);
  font-weight: 400;
}

.tfc-table td strong {
  font-weight: 400;
  color: var(--charcoal);
}

/* ── Details table (charcoal theme) ────────────────────────── */

.tfc-details-table {
  border: 1px solid var(--tan) !important;
}

.tfc-details-table tr {
  background: var(--panel) !important;
  border-bottom: 1px solid rgba(255,255,255,0.07) !important;
}

.tfc-details-table tr:nth-child(even) {
  background: var(--cream-dark) !important;
}

.tfc-details-table tr td {
  color: var(--warm-mid) !important;
  font-weight: 300;
}

.tfc-details-table tr td strong {
  color: var(--charcoal) !important;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.tfc-details-table tr td:last-child {
  color: var(--charcoal) !important;
  font-weight: 400;
  text-align: right;
}

/* ── Total row ──────────────────────────────────────────────── */

.tfc-table tr.total-row {
  background: var(--cream-dark) !important;
  border: none;
}

.tfc-table tr.total-row td {
  color: var(--charcoal) !important;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 16px;
}

.tfc-table tr.total-row td:last-child {
  color: var(--gold) !important;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* ── Grand Total block ──────────────────────────────────────── */

.total-section {
  background: var(--cream-dark);
  border: 1px solid var(--tan);
  padding: 28px 28px 24px;
  margin-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.total-section h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  font-style: italic;
  color: var(--warm-mid);
  margin: 0;
}

.total-amount {
  font-family: 'Cormorant Garamond', serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--charcoal);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

/* ── Reset row ──────────────────────────────────────────────── */

.tfc-reset-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--tan);
}

.tfc-reset-btn {
  background: none;
  border: 1px solid var(--charcoal);
  color: var(--charcoal);
  font-family: 'Jost', sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tfc-reset-btn:hover {
  background: var(--gold-deep);
  color: var(--white);
}

.tfc-reset-note {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
}

/* ── Mansion Tax notice ─────────────────────────────────────── */

.tfc-notice {
  background: var(--cream);
  border-left: 3px solid var(--gold);
  padding: 14px 18px;
  margin-top: 16px;
  font-size: 12px;
  font-weight: 300;
  color: var(--warm-mid);
  line-height: 1.6;
}

.tfc-notice strong {
  font-weight: 500;
  color: var(--charcoal);
}
