/**
 * SBC RF Calculators — styles
 * Uses SBC's teal palette (#0E8B98 primary, #074A53 accent, #cfe8ea result bg).
 * Self-contained; no external font dependencies.
 */

.sbc-calc,
.sbc-calc-tabs {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: #494949;
	max-width: 900px;
	margin: 1.5rem 0;
}
.sbc-calc *,
.sbc-calc *::before,
.sbc-calc *::after,
.sbc-calc-tabs *,
.sbc-calc-tabs *::before,
.sbc-calc-tabs *::after {
	box-sizing: border-box;
}

.sbc-calc {
	border: 1px solid #979797;
	border-radius: 4px;
	padding: 1.5rem;
	background: #fff;
}

.sbc-calc__title {
	font-size: 1.15rem;
	font-weight: 600;
	color: #074A53;
	margin: 0 0 1rem 0;
	padding: 0 0 0.5rem 0;
	border-bottom: 1px solid #e0e0e0;
}

.sbc-calc__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	align-items: start;
}
@media (max-width: 640px) {
	.sbc-calc__grid { grid-template-columns: 1fr; }
}

.sbc-calc__inputs { display: flex; flex-direction: column; gap: 0.85rem; }

.sbc-calc__field { display: flex; flex-direction: column; gap: 0.35rem; }
.sbc-calc__field label {
	font-size: 0.85rem;
	font-weight: 500;
	color: #333;
}
.sbc-calc__field input[type="number"],
.sbc-calc__field select,
.sbc-calc__row input[type="number"],
.sbc-calc__row select {
	width: 100%;
	height: 2.5rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid #878787;
	border-radius: 3px;
	background: #fff;
	font-size: 0.9rem;
	font-family: inherit;
	color: #222;
}
.sbc-calc__field input[type="number"]:focus,
.sbc-calc__field select:focus,
.sbc-calc__row input[type="number"]:focus,
.sbc-calc__row select:focus {
	outline: none;
	border-color: #0E8B98;
	box-shadow: 0 0 0 2px rgba( 14, 139, 152, 0.2 );
}
.sbc-calc__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.sbc-calc__btn {
	appearance: none;
	-webkit-appearance: none;
	background: #0E8B98;
	color: #fff;
	border: none;
	border-radius: 3px;
	padding: 0.75rem 1rem;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.15s ease;
	width: 100%;
	font-family: inherit;
}
.sbc-calc__btn:hover  { background: #0a6f79; }
.sbc-calc__btn:focus  { outline: none; box-shadow: 0 0 0 3px rgba( 14, 139, 152, 0.35 ); }
.sbc-calc__btn:active { background: #085760; }

.sbc-calc__error {
	color: #a11c1c;
	font-size: 0.85rem;
	min-height: 1rem;
}

.sbc-calc__result {
	border: 1px solid #074A53;
	background: #cfe8ea;
	border-radius: 4px;
	padding: 1rem 1.25rem;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s ease;
}
.sbc-calc__result.is-visible { visibility: visible; opacity: 1; }
.sbc-calc__result h4 {
	font-size: 1rem;
	color: #074A53;
	margin: 0 0 0.6rem 0;
}
.sbc-calc__result-line { display: flex; align-items: baseline; gap: 0.4rem; margin: 0.25rem 0; }
.sbc-calc__result-label { font-size: 0.9rem; font-weight: 500; color: #333; }
.sbc-calc__result-value { font-size: 1.25rem; font-weight: 700; color: #074A53; }
.sbc-calc__result-unit  { font-size: 0.9rem; color: #333; }

.sbc-calc__formula {
	margin: 1rem 0 0 0;
	padding-top: 0.75rem;
	border-top: 1px solid #e0e0e0;
	font-size: 0.8rem;
	color: #666;
	font-style: italic;
}
.sbc-calc__formula sub { font-size: 0.7em; }

/* ---------------- BDA Optimization download panel ---------------- */

.sbc-calc--info .sbc-bda__body {
	max-width: 100%;
}
.sbc-bda__eyebrow {
	margin: 0 0 0.4rem 0;
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #0E8B98;
	font-weight: 600;
}
.sbc-bda__heading {
	margin: 0 0 0.85rem 0;
	font-size: 1.05rem;
	font-weight: 600;
	color: #074A53;
}
.sbc-bda__body p {
	margin: 0 0 0.85rem 0;
	line-height: 1.55;
	font-size: 0.95rem;
	color: #333;
}
.sbc-bda__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1rem;
	margin-top: 1.25rem;
	padding-top: 1rem;
	border-top: 1px solid #e0e0e0;
}
.sbc-bda__pill {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: #0E8B98;
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	padding: 0.65rem 1.25rem;
	border-radius: 999px;
	border: none;
	line-height: 1.2;
	transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
	box-shadow: 0 2px 6px rgba( 7, 74, 83, 0.15 );
}
.sbc-bda__pill:hover,
.sbc-bda__pill:focus {
	background: #0a6f79;
	color: #fff;
	text-decoration: none;
	box-shadow: 0 4px 12px rgba( 7, 74, 83, 0.25 );
}
.sbc-bda__pill:active {
	transform: translateY( 1px );
	box-shadow: 0 1px 3px rgba( 7, 74, 83, 0.25 );
}
.sbc-bda__pill--disabled {
	background: #9aa5a7;
	cursor: not-allowed;
	box-shadow: none;
}
.sbc-bda__pill--disabled:hover,
.sbc-bda__pill--disabled:focus {
	background: #9aa5a7;
	box-shadow: none;
}
.sbc-bda__pill-icon { flex-shrink: 0; }
.sbc-bda__pill-version {
	background: rgba( 255, 255, 255, 0.25 );
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
	font-size: 0.75rem;
	margin-left: 0.35rem;
}
.sbc-bda__filename {
	font-size: 0.85rem;
	color: #666;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.sbc-bda__hint {
	font-size: 0.85rem;
	color: #a11c1c;
	flex-basis: 100%;
}
.sbc-bda__hint code {
	background: #f4f4f4;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 0.9em;
}

/* ---------------- Tabs ---------------- */

.sbc-calc-tabs__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	border-bottom: 2px solid #074A53;
	margin-bottom: 0;
}
.sbc-calc-tabs__btn {
	appearance: none;
	-webkit-appearance: none;
	background: #f4f4f4;
	color: #494949;
	border: 1px solid #d0d0d0;
	border-bottom: none;
	border-radius: 4px 4px 0 0;
	padding: 0.5rem 0.9rem;
	font-size: 0.85rem;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	transition: background-color 0.15s ease, color 0.15s ease;
}
.sbc-calc-tabs__btn:hover { background: #e8e8e8; }
.sbc-calc-tabs__btn.is-active {
	background: #074A53;
	color: #fff;
	border-color: #074A53;
}
.sbc-calc-tabs__panel { display: none; }
.sbc-calc-tabs__panel.is-active { display: block; }
.sbc-calc-tabs__panel .sbc-calc { margin-top: 0; border-top-left-radius: 0; }
