/**
 * Calculadora IMT — Estilos
 * Litoral Viver Core Plugin
 */

/* ── Custom properties ─────────────────────────────────────────────────────── */
.lv-calculadora-imt {
	--lv-primary:      #213443;
	--lv-accent:       #6BB64F;
	--lv-accent-light: #e8f5f1;
	--lv-text:         #1a1a2e;
	--lv-muted:        #6b7280;
	--lv-border:       #d1d5db;
	--lv-bg:           #ffffff;
	--lv-radius:       0.5rem;
	--lv-shadow:       0 2px 16px rgba(27, 42, 74, 0.10);
	--lv-input-h:      2.75rem;
}

/* ── Card wrapper ──────────────────────────────────────────────────────────── */
.lv-calculadora-imt {
	max-width: 600px;
	margin: 2rem auto;
	padding: 2rem 2rem 1.75rem;
	background: var(--lv-bg);
	border-radius: var(--lv-radius);
	box-shadow: var(--lv-shadow);
	font-family: inherit;
	color: var(--lv-text);
}

/* ── Headings ──────────────────────────────────────────────────────────────── */
.lv-calc-title {
	margin: 0 0 0.375rem;
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--lv-primary);
	line-height: 1.25;
}

.lv-calc-subtitle {
	margin: 0 0 1.75rem;
	font-size: 0.9375rem;
	color: var(--lv-muted);
}

/* ── Form fields ───────────────────────────────────────────────────────────── */
.lv-calc-field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	margin-bottom: 1.125rem;
}

.lv-calc-field label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--lv-primary);
	letter-spacing: 0.01em;
}

.lv-calc-field input[type="number"],
.lv-calc-field select {
	height: var(--lv-input-h);
	padding: 0 0.875rem;
	border: 1.5px solid var(--lv-border);
	border-radius: var(--lv-radius);
	background: var(--lv-bg);
	font-size: 1rem;
	color: var(--lv-text);
	outline: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	appearance: none;
	-webkit-appearance: none;
	width: 100%;
	box-sizing: border-box;
}

/* Custom arrow for selects */
.lv-calc-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231B2A4A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2.5rem;
}

.lv-calc-field input[type="number"]:focus,
.lv-calc-field select:focus {
	border-color: var(--lv-accent);
	box-shadow: 0 0 0 3px rgba(42, 127, 98, 0.15);
}

/* Hide native number spinners */
.lv-calc-field input[type="number"]::-webkit-inner-spin-button,
.lv-calc-field input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.lv-calc-field input[type="number"] {
	-moz-appearance: textfield;
}

/* ── Submit button ─────────────────────────────────────────────────────────── */
.lv-calc-btn {
	display: block;
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.8125rem 1.5rem;
	background: var(--lv-primary);
	color: #ffffff;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: var(--lv-radius);
	cursor: pointer;
	letter-spacing: 0.02em;
	transition: background 0.18s ease, transform 0.1s ease;
}

.lv-calc-btn:hover,
.lv-calc-btn:focus-visible {
	background: #253a62;
	outline: none;
}

.lv-calc-btn:active {
	transform: scale(0.98);
}

/* ── Results area ──────────────────────────────────────────────────────────── */
.lv-calc-results {
	margin-top: 1.75rem;
	padding: 1.25rem 1.375rem;
	background: var(--lv-accent-light);
	border-left: 4px solid var(--lv-accent);
	border-radius: var(--lv-radius);
}

.lv-calc-results[hidden] {
	display: none;
}

.lv-calc-results h3 {
	margin: 0 0 1rem;
	font-size: 1.0625rem;
	font-weight: 700;
	color: var(--lv-primary);
}

/* ── Result list ───────────────────────────────────────────────────────────── */
.lv-calc-result-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.lv-calc-result-list li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.9375rem;
	padding-bottom: 0.625rem;
	border-bottom: 1px solid rgba(27, 42, 74, 0.10);
}

.lv-calc-result-list li:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.lv-calc-label {
	color: var(--lv-muted);
}

.lv-calc-value {
	font-weight: 600;
	color: var(--lv-primary);
}

/* ── Total row highlight ───────────────────────────────────────────────────── */
.lv-calc-total {
	margin-top: 0.25rem;
	padding-top: 0.625rem !important;
	border-top: 2px solid var(--lv-accent) !important;
	border-bottom: none !important;
}

.lv-calc-total .lv-calc-label {
	font-weight: 700;
	color: var(--lv-primary);
	font-size: 1rem;
}

.lv-calc-total .lv-calc-value {
	font-size: 1.125rem;
	color: var(--lv-accent);
}

/* ── Disclaimer ────────────────────────────────────────────────────────────── */
.lv-calc-disclaimer {
	margin: 1rem 0 0;
	font-size: 0.8125rem;
	color: var(--lv-muted);
	font-style: italic;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media ( max-width: 480px ) {
	.lv-calculadora-imt {
		padding: 1.25rem 1rem 1rem;
	}

	.lv-calc-title {
		font-size: 1.25rem;
	}

	.lv-calc-result-list li {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.125rem;
	}
}
