/* Cotizador EuropaSchule — front-end styles */

.ces-cotizador {
	--ces-primary: #003399; /* Europe blue */
	--ces-accent: #ffcc00;
	--ces-border: #d9dde3;
	--ces-bg-soft: #f5f7fa;
	max-width: 860px;
	margin: 0 auto;
	padding: 1.5rem;
	border: 1px solid var(--ces-border);
	border-radius: 12px;
	background: #fff;
	font-size: 1rem;
	line-height: 1.5;
}

.ces-header h3 {
	margin: 0 0 0.25rem;
	color: var(--ces-primary);
}

.ces-subtitle {
	margin: 0 0 1.25rem;
	color: #555;
	font-size: 0.95em;
}

.ces-form fieldset {
	border: 1px solid var(--ces-border);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin: 0 0 1.25rem;
}

.ces-form legend {
	font-weight: 600;
	color: var(--ces-primary);
	padding: 0 0.5rem;
}

.ces-hint {
	margin: 0.25rem 0 0.75rem;
	font-size: 0.88em;
	color: #666;
}

.ces-child-row {
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px dashed var(--ces-border);
}

.ces-child-row:last-of-type {
	border-bottom: none;
}

.ces-child-main {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.ces-grad-option,
.ces-ceremony-option,
.ces-grad-mandatory {
	display: block;
	margin: 0.35rem 0 0 5.5rem;
	font-size: 0.9em;
	color: #555;
}

.ces-ceremony-option {
	margin-left: 7rem;
}

.ces-grad-mandatory {
	color: var(--ces-primary);
	font-weight: 600;
}

.ces-child-label {
	min-width: 5.5rem;
	font-weight: 600;
}

.ces-grade-select,
.ces-level-select {
	flex: 1;
	min-width: 200px;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--ces-border);
	border-radius: 6px;
	background: #fff;
}

.ces-modality-select {
	min-width: 150px;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--ces-border);
	border-radius: 6px;
	background: #fff;
}

.ces-btn {
	cursor: pointer;
	border-radius: 6px;
	border: 1px solid transparent;
	padding: 0.5rem 1rem;
	font-size: 0.95em;
}

.ces-btn-primary {
	background: var(--ces-primary);
	color: #fff;
	border-color: var(--ces-primary);
}

.ces-btn-primary:hover {
	background: #002269;
}

.ces-btn-secondary {
	background: var(--ces-bg-soft);
	border-color: var(--ces-border);
	color: var(--ces-primary);
}

.ces-btn-link {
	background: none;
	border: none;
	color: #a00;
	text-decoration: underline;
	padding: 0.25rem;
}

.ces-radio {
	display: block;
	margin: 0.4rem 0;
}

.ces-radio input {
	margin-right: 0.5rem;
}

.ces-generate {
	display: flex;
	align-items: center;
	gap: 0.9rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.ces-generate-status {
	font-size: 0.9em;
	color: #8a6d00;
}

.ces-results.ces-stale {
	opacity: 0.45;
}

.ces-tag {
	display: inline-block;
	font-size: 0.75em;
	border-radius: 999px;
	padding: 0.05rem 0.55rem;
	background: #e7eefc;
	color: var(--ces-primary);
	vertical-align: middle;
}

.ces-tag-hs {
	background: #e6f4ea;
	color: #0a7a2f;
}

.ces-results-title {
	color: var(--ces-primary);
	margin: 1rem 0 0.5rem;
}

/* Option A — lead with the two numbers parents care about */
.ces-hero-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 1rem;
	margin: 0.75rem 0;
}

.ces-hero-lbl {
	font-size: 0.82em;
	font-weight: 500;
	color: #555;
}

.ces-hero-val {
	font-size: 1.9em;
	font-weight: 700;
	color: var(--ces-primary);
	line-height: 1.1;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
}

.ces-hero-val.ces-hero-sm {
	font-size: 1.4em;
}

.ces-hero-per {
	font-size: 0.5em;
	font-weight: 500;
	color: #555;
}

.ces-hero-sub {
	font-size: 0.78em;
	color: #8a8f96;
	margin-top: 2px;
}

.ces-total-soft {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.6rem;
	border-top: 1px solid var(--ces-border);
	padding-top: 0.6rem;
	font-size: 0.92em;
	color: #555;
}

.ces-total-soft-v {
	font-weight: 600;
	color: var(--ces-primary);
	font-variant-numeric: tabular-nums;
}

.ces-detail-toggle {
	background: none;
	border: none;
	color: var(--ces-primary);
	font: inherit;
	font-size: 0.9em;
	cursor: pointer;
	padding: 0.5rem 0;
	border-bottom: 1px dotted var(--ces-primary);
}

.ces-detail {
	margin-top: 0.75rem;
}

/* Per-child cards — matrícula + cuota mensual for each child (2+ children) */
.ces-pc-label,
.ces-fam-label {
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #8a8f96;
	margin: 0.25rem 0 0.55rem;
}

.ces-pc-card {
	background: var(--ces-bg-soft);
	border: 1px solid var(--ces-border);
	border-radius: 8px;
	padding: 0.7rem 0.85rem;
	margin-bottom: 0.6rem;
}

.ces-pc-head {
	font-size: 0.85em;
	font-weight: 600;
	color: #2c3038;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	margin-bottom: 0.6rem;
}

.ces-pc-who {
	font-weight: 700;
	color: var(--ces-primary);
}

.ces-pc-tag {
	font-size: 0.7em;
	font-weight: 600;
	border-radius: 999px;
	padding: 0.05rem 0.5rem;
	background: #e7eefc;
	color: var(--ces-primary);
}

.ces-pc-tag.hs {
	background: #e6f4ea;
	color: #0a7a2f;
}

.ces-pc-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
}

.ces-pc-stat .l {
	font-size: 0.72em;
	color: #6b7078;
}

.ces-pc-stat .v {
	font-size: 1.15em;
	font-weight: 700;
	color: var(--ces-primary);
	line-height: 1.15;
	font-variant-numeric: tabular-nums;
	letter-spacing: -0.01em;
}

.ces-pc-stat .v .per {
	font-size: 0.6em;
	font-weight: 500;
	color: #6b7078;
}

.ces-pc-grad {
	font-size: 0.75em;
	color: #a15c00;
	margin-top: 0.5rem;
	padding-top: 0.4rem;
	border-top: 1px dashed var(--ces-border);
}

.ces-fam {
	margin-top: 0.5rem;
	padding-top: 0.6rem;
	border-top: 2px solid var(--ces-primary);
}

.ces-fam-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
}

.ces-fam-stats .l {
	font-size: 0.72em;
	color: #6b7078;
}

.ces-fam-stats .v {
	font-size: 1em;
	font-weight: 700;
	color: #2c3038;
	font-variant-numeric: tabular-nums;
}

.ces-fam-stats .v .ces-hero-per {
	font-size: 0.72em;
}

.ces-table-wrap {
	overflow-x: auto;
}

.ces-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1rem;
}

.ces-table th,
.ces-table td {
	border: 1px solid var(--ces-border);
	padding: 0.55rem 0.7rem;
	text-align: left;
	vertical-align: top;
}

.ces-table thead th {
	background: var(--ces-bg-soft);
	color: var(--ces-primary);
}

.ces-table tfoot td {
	background: var(--ces-bg-soft);
}

.ces-discount-tag {
	color: #0a7a2f;
	font-weight: 600;
}

.ces-plan {
	background: var(--ces-bg-soft);
	border-left: 4px solid var(--ces-accent);
	border-radius: 6px;
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
}

.ces-plan h4 {
	margin: 0 0 0.5rem;
	color: var(--ces-primary);
}

.ces-plan ul {
	margin: 0;
	padding-left: 1.2rem;
}

.ces-savings {
	color: #0a7a2f;
	font-weight: 600;
}

.ces-note {
	color: #8a6d00;
	background: #fff8e1;
	border: 1px solid #ffe08a;
	border-radius: 6px;
	padding: 0.5rem 0.75rem;
}

.ces-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	margin: 0.5rem 0 1rem;
}

.ces-actions .ces-generate-status {
	font-size: 0.9em;
	color: #555;
}

.ces-contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0.75rem;
	margin: 0.5rem 0 0.75rem;
}

.ces-field {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	font-size: 0.9em;
	color: #555;
}

.ces-field input {
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--ces-border);
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
}

.ces-consent {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.9em;
	color: #555;
}

.ces-consent input {
	margin-top: 0.2rem;
	flex: 0 0 auto;
}

.ces-rules {
	border-top: 1px solid var(--ces-border);
	margin-top: 1rem;
	padding-top: 1rem;
	font-size: 0.92em;
	color: #444;
}

.ces-rules h4 {
	color: var(--ces-primary);
}

.ces-contact a {
	color: var(--ces-primary);
	font-weight: 600;
}

/* Print: show only the quote */
@media print {
	body * {
		visibility: hidden;
	}
	.ces-cotizador,
	.ces-cotizador * {
		visibility: visible;
	}
	.ces-cotizador {
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		border: none;
	}
	.ces-actions,
	.ces-btn,
	.ces-detail-toggle {
		display: none !important;
	}
	/* Always include the full breakdown in the printed/PDF quote. */
	.ces-detail[hidden] {
		display: block !important;
	}
}

@media (max-width: 600px) {
	.ces-cotizador {
		padding: 1rem;
	}
	.ces-child-main {
		align-items: stretch;
		flex-direction: column;
		gap: 0.35rem;
	}
	.ces-grad-option,
	.ces-grad-mandatory {
		margin-left: 0;
	}
	.ces-ceremony-option {
		margin-left: 1.5rem;
	}
}
