/*
 * Layout only below — no font-family, no base text/background colors.
 * Those are left unset on purpose so the plugin inherits the parent
 * theme's typography and colors. The exceptions are the --slc-accent /
 * --slc-success / --slc-warning custom properties (set inline per
 * shortcode instance) and the modal/toast, which need a fixed, legible
 * surface regardless of the page behind them.
 */

.slc-calculator {
	color: var(--slc-text-override, inherit);
	max-width: 1100px;
	margin: 0 auto;
}

.slc-app {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.slc-panel {
	border: 1px solid rgba(127, 127, 127, 0.25);
	border-radius: 16px;
	background-color: #fafaf7;
	padding: 24px;
}

.slc-field { margin-bottom: 16px; }
.slc-field:last-child { margin-bottom: 0; }

.slc-field-label {
	display: block;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	opacity: 0.6;
	margin-bottom: 6px;
}

.slc-calculator select.slc-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid rgba(127, 127, 127, 0.25);
	border-radius: 8px;
	font: inherit;
	color: inherit;
	background: transparent;
	cursor: pointer;
}

.slc-result-section { margin-bottom: 20px; }

.slc-result-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.6;
	margin-bottom: 6px;
}

.slc-result-amount {
	font-size: 48px;
	font-weight: 700;
	letter-spacing: -1px;
	line-height: 1;
	margin-bottom: 6px;
}

.slc-result-sub {
	font-size: 14px;
	opacity: 0.75;
}

.slc-info-card {
	border-radius: 8px;
	padding: 12px 14px;
	margin-top: 14px;
	font-size: 13px;
	line-height: 1.5;
}

.slc-info-card.slc-note {
	border: 1px solid rgba(127, 127, 127, 0.25);
}

.slc-info-card.slc-savings {
	background: var(--slc-success-bg, rgba(45, 139, 78, 0.12));
	color: var(--slc-success, #2D8B4E);
}

.slc-breakdown {
	border-top: 1px solid rgba(127, 127, 127, 0.2);
	padding-top: 16px;
	margin-top: 16px;
}

.slc-breakdown-title {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.6;
	margin-bottom: 10px;
}

.slc-breakdown-row {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	font-size: 13px;
	letter-spacing: 0.03em;
	border-bottom: 1px solid rgba(127, 127, 127, 0.15);
}

.slc-breakdown-row:last-child { border-bottom: none; }

.slc-breakdown-row span:last-child {
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	min-width: 75px;
  	text-align: right;
}

.slc-breakdown-footnote {
	margin-top: 10px;
	font-size: 11px;
	opacity: 0.55;
	letter-spacing: 0.03em;
}

.slc-actions { display: flex; gap: 10px; margin-top: 18px; }

.slc-btn {
	flex: 1;
	padding: 12px 16px;
	border-radius: 8px;
	font: inherit;
	font-size: 13px;
	font-weight: 800;
	cursor: pointer;
}

.slc-btn-primary {
	background: var(--slc-accent, #D4570A);
	border: 1px solid var(--slc-accent, #D4570A);
	color: #fff;
}

.slc-btn-secondary {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

/*
 * The modal and toast are overlays shown on top of arbitrary page
 * content, so — unlike the rest of the calculator — they keep a fixed
 * light surface for legibility rather than inheriting the theme.
 */
.slc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 10000;
}

.slc-modal-overlay.active { display: flex; }

.slc-modal {
	position: relative;
	background: #fff;
	color: #1a1a1a;
	border-radius: 16px;
	padding: 32px;
	max-width: 440px;
	width: 90%;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.slc-modal h3 { font-size: 22px; margin: 0 0 6px; }
.slc-modal p { font-size: 14px; opacity: 0.7; margin: 0 0 18px; }

.slc-modal input,
.slc-modal textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	color: #1a1a1a;
	margin-bottom: 10px;
}

.slc-modal textarea { resize: vertical; min-height: 80px; }
.slc-modal .slc-btn { width: 100%; margin-top: 4px; }

.slc-modal-close {
	position: absolute;
	top: 14px;
	right: 14px;
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	opacity: 0.5;
}

.slc-modal-footnote {
	font-size: 11px;
	opacity: 0.5;
	text-align: center;
	margin-top: 10px;
}

.slc-toast {
	position: fixed;
	bottom: 24px;
	left: 50%;
	transform: translateX(-50%) translateY(60px);
	background: #1a1a1a;
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	font-weight: 600;
	opacity: 0;
	transition: all 0.3s ease;
	z-index: 10001;
	pointer-events: none;
}

.slc-toast.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

@media (max-width: 768px) {
	.slc-app { grid-template-columns: 1fr; }
	.slc-result-amount { font-size: 38px; }
}
