/* =========================================================================
   Florida Closing Cost Calculator — scoped styles (.flcc-root namespace)
   Coastal / refined-professional aesthetic. Deep teal + warm sand accent.
   All selectors are namespaced so the widget won't fight the host theme.
   ========================================================================= */

.flcc-root {
	--flcc-ink: #10282e;          /* deep teal-ink for text            */
	--flcc-ink-soft: #4a6168;     /* muted body text                   */
	--flcc-line: #dfe6e6;         /* hairlines / borders               */
	--flcc-bg: #ffffff;
	--flcc-panel: #f6f8f8;        /* soft panel background             */
	--flcc-brand: #14505c;        /* primary brand teal                */
	--flcc-brand-dk: #0e3a44;
	--flcc-accent: #c29545;       /* warm sand / brass accent          */
	--flcc-accent-dk: #a87d31;
	--flcc-good: #1f7a5a;
	--flcc-credit: #1f7a5a;
	--flcc-radius: 14px;
	--flcc-radius-sm: 9px;
	--flcc-shadow: 0 1px 2px rgba(16,40,46,.04), 0 8px 30px rgba(16,40,46,.07);

	all: revert;
	box-sizing: border-box;
	max-width: 1040px;
	margin: 0 auto;
	color: var(--flcc-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.flcc-root *,
.flcc-root *::before,
.flcc-root *::after { box-sizing: border-box; }

/* ---- Card shell ---- */
.flcc-card {
	background: var(--flcc-bg);
	border: 1px solid var(--flcc-line);
	border-radius: var(--flcc-radius);
	box-shadow: var(--flcc-shadow);
	overflow: hidden;
}

/* ---- Header ---- */
.flcc-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 26px;
	background: linear-gradient(135deg, var(--flcc-brand-dk) 0%, var(--flcc-brand) 100%);
	color: #fff;
}
.flcc-head h2 {
	margin: 0;
	font-size: 1.28rem;
	font-weight: 650;
	letter-spacing: .2px;
	line-height: 1.2;
	color: #fff;
}
.flcc-head .flcc-sub {
	margin: 4px 0 0;
	font-size: .82rem;
	color: rgba(255,255,255,.78);
}
.flcc-lang {
	display: inline-flex;
	border: 1px solid rgba(255,255,255,.35);
	border-radius: 999px;
	overflow: hidden;
	flex: none;
}
.flcc-lang button {
	background: transparent;
	border: 0;
	color: rgba(255,255,255,.82);
	font: inherit;
	font-size: .8rem;
	font-weight: 600;
	padding: 6px 14px;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.flcc-lang button.is-active { background: var(--flcc-accent); color: #1c1305; }

/* ---- Role toggle ---- */
.flcc-roles {
	display: flex;
	gap: 0;
	padding: 0 26px;
	border-bottom: 1px solid var(--flcc-line);
	background: var(--flcc-bg);
}
.flcc-roles button {
	flex: 1;
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	font: inherit;
	font-weight: 600;
	color: var(--flcc-ink-soft);
	padding: 16px 8px;
	cursor: pointer;
	transition: color .15s, border-color .15s;
}
.flcc-roles button.is-active {
	color: var(--flcc-brand);
	border-bottom-color: var(--flcc-accent);
}
.flcc-roles button span { display: block; font-size: .74rem; font-weight: 500; color: var(--flcc-ink-soft); margin-top: 2px; }

/* ---- Body grid ---- */
.flcc-body { display: grid; grid-template-columns: 1.05fr 1fr; }
@media (max-width: 780px) { .flcc-body { grid-template-columns: 1fr; } }

.flcc-inputs { padding: 24px 26px; }
.flcc-results {
	padding: 24px 26px;
	background: var(--flcc-panel);
	border-left: 1px solid var(--flcc-line);
}
@media (max-width: 780px) {
	.flcc-results { border-left: 0; border-top: 1px solid var(--flcc-line); }
}

/* ---- Input groups ---- */
.flcc-group { margin-bottom: 18px; }
.flcc-group:last-child { margin-bottom: 0; }
.flcc-label {
	display: block;
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .3px;
	text-transform: uppercase;
	color: var(--flcc-ink-soft);
	margin-bottom: 6px;
}
.flcc-hint { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--flcc-accent-dk); }

.flcc-field {
	display: flex;
	align-items: center;
	border: 1px solid var(--flcc-line);
	border-radius: var(--flcc-radius-sm);
	background: var(--flcc-bg);
	overflow: hidden;
	transition: border-color .15s, box-shadow .15s;
}
.flcc-field:focus-within {
	border-color: var(--flcc-brand);
	box-shadow: 0 0 0 3px rgba(20,80,92,.12);
}
.flcc-field .flcc-pre,
.flcc-field .flcc-post {
	padding: 0 12px;
	color: var(--flcc-ink-soft);
	font-weight: 600;
	font-size: .95rem;
	background: var(--flcc-panel);
	align-self: stretch;
	display: flex;
	align-items: center;
}
.flcc-field .flcc-post { border-left: 1px solid var(--flcc-line); }
.flcc-field .flcc-pre { border-right: 1px solid var(--flcc-line); }
.flcc-field input,
.flcc-field select {
	flex: 1;
	width: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	color: var(--flcc-ink);
	padding: 11px 12px;
	min-width: 0;
}
.flcc-field input[type="date"] { color: var(--flcc-ink); }
.flcc-field select { cursor: pointer; appearance: none; padding-right: 28px; }
.flcc-select-wrap { position: relative; display: flex; flex: 1; }
.flcc-select-wrap::after {
	content: "";
	position: absolute; right: 12px; top: 50%;
	width: 8px; height: 8px;
	border-right: 2px solid var(--flcc-ink-soft);
	border-bottom: 2px solid var(--flcc-ink-soft);
	transform: translateY(-65%) rotate(45deg);
	pointer-events: none;
}

/* ---- Segmented control (cash/mortgage, payer toggles) ---- */
.flcc-seg {
	display: inline-flex;
	width: 100%;
	border: 1px solid var(--flcc-line);
	border-radius: var(--flcc-radius-sm);
	overflow: hidden;
	background: var(--flcc-bg);
}
.flcc-seg button {
	flex: 1;
	background: transparent;
	border: 0;
	font: inherit;
	font-size: .9rem;
	font-weight: 600;
	color: var(--flcc-ink-soft);
	padding: 10px 8px;
	cursor: pointer;
	transition: background .15s, color .15s;
}
.flcc-seg button.is-active { background: var(--flcc-brand); color: #fff; }
.flcc-seg.flcc-seg-accent button.is-active { background: var(--flcc-accent); color: #1c1305; }

.flcc-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .flcc-row2 { grid-template-columns: 1fr; } }

/* ---- Collapsible advanced section ---- */
.flcc-adv-toggle {
	display: inline-flex; align-items: center; gap: 7px;
	background: none; border: 0; cursor: pointer;
	font: inherit; font-weight: 600; font-size: .85rem;
	color: var(--flcc-brand); padding: 4px 0; margin-top: 4px;
}
.flcc-adv-toggle .flcc-chev {
	width: 7px; height: 7px;
	border-right: 2px solid var(--flcc-brand);
	border-bottom: 2px solid var(--flcc-brand);
	transform: rotate(45deg);
	transition: transform .2s;
}
.flcc-adv.is-open + .flcc-adv-toggle .flcc-chev,
.flcc-adv-toggle.is-open .flcc-chev { transform: rotate(-135deg); }
.flcc-adv {
	display: none;
	margin-top: 14px;
	padding-top: 16px;
	border-top: 1px dashed var(--flcc-line);
}
.flcc-adv.is-open { display: block; }

/* ---- Results ---- */
.flcc-res-title {
	display: flex; align-items: baseline; justify-content: space-between;
	font-size: .78rem; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
	color: var(--flcc-brand); margin: 0 0 14px;
}
.flcc-res-title .flcc-county-tag { color: var(--flcc-ink-soft); font-weight: 600; }

.flcc-lines { margin: 0 0 4px; }
.flcc-line {
	display: flex; align-items: flex-start; justify-content: space-between;
	gap: 12px; padding: 9px 0;
	border-bottom: 1px solid var(--flcc-line);
}
.flcc-line .flcc-line-l { min-width: 0; }
.flcc-line .flcc-line-name { font-size: .93rem; font-weight: 500; color: var(--flcc-ink); }
.flcc-line .flcc-line-note { font-size: .76rem; color: var(--flcc-ink-soft); margin-top: 2px; }
.flcc-line .flcc-amt { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.flcc-line.is-credit .flcc-amt { color: var(--flcc-credit); }

.flcc-total {
	display: flex; align-items: baseline; justify-content: space-between;
	margin-top: 16px; padding: 16px 18px;
	background: var(--flcc-brand-dk); color: #fff;
	border-radius: var(--flcc-radius-sm);
}
.flcc-total .flcc-total-label { font-size: .8rem; font-weight: 600; letter-spacing: .3px; text-transform: uppercase; color: rgba(255,255,255,.82); }
.flcc-total .flcc-total-amt { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.flcc-cash {
	display: flex; align-items: baseline; justify-content: space-between;
	margin-top: 10px; padding: 14px 18px;
	border: 1px solid var(--flcc-accent);
	background: #fbf6ec;
	border-radius: var(--flcc-radius-sm);
}
.flcc-cash .flcc-cash-label { font-size: .82rem; font-weight: 700; color: var(--flcc-accent-dk); }
.flcc-cash .flcc-cash-sub { font-size: .72rem; font-weight: 500; color: var(--flcc-ink-soft); margin-top: 2px; }
.flcc-cash .flcc-cash-amt { font-size: 1.25rem; font-weight: 700; color: var(--flcc-ink); font-variant-numeric: tabular-nums; }

.flcc-actions { display: flex; gap: 10px; margin-top: 16px; }
.flcc-btn {
	flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	font: inherit; font-weight: 600; font-size: .88rem;
	padding: 11px 14px; border-radius: var(--flcc-radius-sm);
	cursor: pointer; border: 1px solid var(--flcc-brand);
	background: var(--flcc-brand); color: #fff;
	transition: background .15s, transform .05s;
}
.flcc-btn:hover { background: var(--flcc-brand-dk); }
.flcc-btn:active { transform: translateY(1px); }
.flcc-btn.flcc-btn-ghost { background: transparent; color: var(--flcc-brand); }
.flcc-btn.flcc-btn-ghost:hover { background: rgba(20,80,92,.07); }

.flcc-disclaimer {
	margin-top: 18px;
	font-size: .72rem;
	line-height: 1.55;
	color: var(--flcc-ink-soft);
}

/* ---- Attribution footer ---- */
.flcc-footer {
	padding: 11px 26px;
	border-top: 1px solid var(--flcc-line);
	background: var(--flcc-panel);
}
.flcc-footer-link {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: .76rem;
	color: var(--flcc-ink-soft);
	text-decoration: none;
	transition: color .15s;
}
.flcc-footer-link:hover { color: var(--flcc-brand); }
.flcc-footer-link strong { color: var(--flcc-brand); font-weight: 700; }

/* ---- Print ---- */
@media print {
	.flcc-root { max-width: 100%; box-shadow: none; }
	.flcc-card { box-shadow: none; border: 0; }
	.flcc-lang, .flcc-roles, .flcc-actions, .flcc-adv-toggle { display: none !important; }
	.flcc-body { grid-template-columns: 1fr; }
	.flcc-inputs { display: none; }
	.flcc-results { border: 0; background: #fff; }
	.flcc-head { background: #fff !important; color: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; border-bottom: 2px solid #000; }
	.flcc-head h2, .flcc-head .flcc-sub { color: #000 !important; }
	.flcc-total { background: #fff !important; color: #000 !important; border: 1.5px solid #000; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
	.flcc-total .flcc-total-label { color: #000 !important; }
}
