/*
 * Vamos price card (draft of 3 Dec 2026, not installed). Loaded only on a page where the card is on or previewed.
 * The look is the Malaga hero card's own (its colours, Poppins and Nunito, which the site already loads); the school
 * pages themselves are not restyled. Every rule is scoped to .vpc or .vpc-dialog; the two html.vpc-* rules at the top
 * are the only ones that reach the page, and only while the card is running.
 * The page's theme styles buttons and fields with force, so the card's own buttons and fields are set with !important.
 */

/* Malaga: the card takes the place of the old two-step card inside #mhCard. The class vpc-js is set by a script in the
   head and taken off again if the card does not start, so the old card is never lost. */
html.vpc-js #mhCard > :not(.vpc) { display: none !important; }
html.vpc-js #mhCard { min-height: 540px; }
@media (max-width: 600px) { html.vpc-open { overflow: hidden; } }

.vpc {
	--ink: #0c1e24; --ink2: #33505a; --muted: #647c86; --line: #9db3af; --teal: #1e7272; --soft: #e6f3f0; --cta: #c2410c;
	font-family: Nunito, Verdana, system-ui, sans-serif;
	color: var(--ink);
	text-align: start;
	line-height: 1.35;
	-webkit-text-size-adjust: 100%;
}
.vpc, .vpc *, .vpc-dialog, .vpc-dialog * { box-sizing: border-box; }
.vpc [hidden], .vpc-holder[hidden] { display: none !important; }
.vpc-form { display: flex; flex-direction: column; gap: 11px; margin: 0; padding: 0; }

.vpc .vpc-title {
	margin: 0 !important; padding: 0 !important;
	font-family: Poppins, Nunito, system-ui, sans-serif !important; font-weight: 700 !important; font-size: 19px !important;
	line-height: 1.2 !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--ink) !important;
}
.vpc .vpc-title:focus { outline: none; }
.vpc-block { display: flex; flex-direction: column; gap: 5px; }
.vpc .vpc-label { font-size: 13px; font-weight: 800; color: var(--ink2); line-height: 1.3; }

.vpc-chips { display: grid; gap: 8px; }
.vpc-chips--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vpc-chips--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vpc-chips--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.vpc button.vpc-chip {
	-webkit-appearance: none !important; appearance: none !important;
	display: flex !important; align-items: center; justify-content: center;
	width: 100% !important; min-height: 44px !important; height: auto !important; margin: 0 !important; padding: 4px 8px !important;
	border: 1.5px solid var(--line) !important; border-radius: 10px !important;
	background: #fff !important; color: var(--ink) !important; box-shadow: none !important;
	font-family: inherit !important; font-weight: 800 !important; font-size: 14.5px !important; line-height: 1.2 !important;
	letter-spacing: 0 !important; text-transform: none !important; text-align: center; white-space: normal; overflow-wrap: anywhere;
	cursor: pointer; transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.vpc .vpc-chips--4 button.vpc-chip { font-size: 15px !important; }
.vpc .vpc-chips--3 button.vpc-chip { font-size: 13.5px !important; padding: 4px 3px !important; white-space: nowrap; overflow-wrap: normal; }
.vpc button.vpc-chip:hover { border-color: var(--teal) !important; }
.vpc button.vpc-chip[aria-pressed="true"] { background: var(--teal) !important; border-color: var(--teal) !important; color: #fff !important; }

.vpc-price {
	display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 10px;
	min-height: 62px; padding: 10px 14px; border-radius: 12px; background: var(--soft);
}
.vpc-price-text { display: flex; flex-direction: column; min-width: 0; }
.vpc-sum { font-size: 13.5px; font-weight: 800; }
.vpc-per { font-size: 13px; font-weight: 700; color: var(--ink2); }
.vpc-note { grid-column: 1 / -1; font-size: 12.5px; font-weight: 700; color: var(--ink2); }
.vpc-note:empty, .vpc-total:empty { display: none; }
.vpc-total { font-family: Poppins, Nunito, system-ui, sans-serif; font-weight: 800; font-size: 28px; line-height: 1; white-space: nowrap; }
.vpc-price--long .vpc-total { font-size: 23px; }
.vpc-price--from .vpc-total { font-size: 17px; white-space: normal; text-align: end; max-width: 150px; line-height: 1.15; }
.vpc-price--none { background: #f1f4f5; border: 1.5px dashed var(--line); }
.vpc-price--wait .vpc-per { color: var(--muted); }

.vpc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.vpc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vpc .vpc-field label { display: block !important; margin: 0 !important; padding: 0 !important; font-size: 13px !important; font-weight: 800 !important; color: var(--ink2) !important; line-height: 1.3 !important; text-transform: none !important; letter-spacing: 0 !important; }
.vpc .vpc-field input {
	-webkit-appearance: none !important; appearance: none !important;
	display: block !important; width: 100% !important; min-height: 46px !important; height: auto !important; margin: 0 !important; padding: 0 12px !important;
	border: 1.5px solid var(--line) !important; border-radius: 10px !important; background: #fff !important; color: var(--ink) !important; box-shadow: none !important;
	font-family: inherit !important; font-size: 16px !important; font-weight: 700 !important; line-height: 1.2 !important;
}
.vpc .vpc-field input:focus { outline: none !important; border-color: var(--teal) !important; box-shadow: 0 0 0 3px rgba(30, 114, 114, .2) !important; }

/* The consent line is the page's own element, moved in here with its own classes. Only its outer margin is set. */
.vpc-consent > * { margin: 0 !important; }
.vpc-consent:empty { display: none; }

/* The tick box of a consent line the card prints itself (Buenos Aires, Online: the line stored by the privacy reviewer's
   word). That line may carry any class, and its page may hold no CSS for it: on the live home page (4 Dec) the stored
   line carried the Malaga hero's class "mh-consent", which only the Malaga page draws, and the theme's rule for every
   checkbox (appearance: none) left a box of 1.8 x 1.8 px that nobody could tick. So the card draws the box itself:
   20 px seen, 44 px to press (the box itself, whatever markup is around it), a focus ring, a ticked state, and nothing
   set by left or right, so a right-to-left page gets the same box on its own side.
   Malaga is left exactly as it is: its line is the Malaga page's own element, moved into the card, drawn by that page. */
.vpc:not([data-school="malaga"]) .vpc-consent { font-size: 13px; line-height: 1.45; color: var(--ink2); }
.vpc:not([data-school="malaga"]) .vpc-consent label {
	display: flex !important; align-items: flex-start !important; gap: 10px !important;
	min-height: 44px !important; margin: 0 !important; padding: 2px 0 !important;
	font-family: inherit !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.45 !important;
	color: var(--ink2) !important; text-transform: none !important; letter-spacing: 0 !important; text-align: start !important;
	cursor: pointer;
}
.vpc:not([data-school="malaga"]) .vpc-consent a { color: var(--teal) !important; text-decoration: underline !important; }
.vpc:not([data-school="malaga"]) .vpc-consent input[type="checkbox"] {
	-webkit-appearance: none !important; -moz-appearance: none !important; appearance: none !important;
	display: inline-block !important; position: relative !important; top: auto !important; right: auto !important; bottom: auto !important; left: auto !important;
	flex: 0 0 44px !important; vertical-align: middle !important;
	width: 44px !important; height: 44px !important; min-width: 44px !important; min-height: 44px !important; max-width: none !important; max-height: none !important;
	margin: -12px !important; padding: 0 !important; border: 0 !important; border-radius: 15px !important;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='18' height='18' rx='4' fill='%23fff' stroke='%23647c86' stroke-width='2'/%3E%3C/svg%3E") center / 20px 20px no-repeat !important;
	box-shadow: none !important; opacity: 1 !important; visibility: visible !important; clip: auto !important; clip-path: none !important; transform: none !important;
	outline: none; cursor: pointer;
}
.vpc:not([data-school="malaga"]) .vpc-consent input[type="checkbox"]:checked { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Crect x='1' y='1' width='18' height='18' rx='4' fill='%231e7272' stroke='%231e7272' stroke-width='2'/%3E%3Cpath d='M5.6 10.4l2.9 2.9 5.9-6.6' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
.vpc:not([data-school="malaga"]) .vpc-consent input[type="checkbox"]:focus-visible { outline: 3px solid var(--ink) !important; outline-offset: -9px !important; }
@media (forced-colors: active) { /* no background pictures in this mode: the browser's own box comes back */
	.vpc:not([data-school="malaga"]) .vpc-consent input[type="checkbox"] {
		-webkit-appearance: auto !important; -moz-appearance: auto !important; appearance: auto !important;
		flex: 0 0 20px !important; width: 20px !important; height: 20px !important; min-width: 0 !important; min-height: 0 !important;
		margin: 0 !important; background: none !important;
	}
}

.vpc-error { padding: 10px 12px; border-radius: 10px; background: #fff3ef; border: 1px solid #f3c3a6; color: #8a2c0b; font-size: 13.5px; font-weight: 700; }

.vpc button.vpc-cta {
	-webkit-appearance: none !important; appearance: none !important;
	display: flex !important; align-items: center; justify-content: center;
	width: 100% !important; min-height: 52px !important; height: auto !important; margin: 0 !important; padding: 10px 14px !important;
	border: 0 !important; border-radius: 12px !important; background: var(--cta) !important; color: #fff !important; box-shadow: none !important;
	font-family: Poppins, Nunito, system-ui, sans-serif !important; font-weight: 700 !important; font-size: 17px !important; line-height: 1.2 !important;
	letter-spacing: 0 !important; text-transform: none !important; text-align: center; cursor: pointer;
}
.vpc button.vpc-cta:hover { background: #a8380a !important; }
.vpc button.vpc-cta:disabled { opacity: .7; cursor: default; }

.vpc-links { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.vpc .vpc-link {
	-webkit-appearance: none !important; appearance: none !important;
	display: inline-flex !important; align-items: center; min-height: 44px !important; margin: 0 !important; padding: 0 !important;
	border: 0 !important; border-radius: 4px !important; background: none !important; box-shadow: none !important;
	color: var(--teal) !important; font-family: inherit !important; font-size: 14px !important; font-weight: 800 !important; line-height: 1.2 !important;
	letter-spacing: 0 !important; text-transform: none !important; text-decoration: underline !important; text-underline-offset: 3px; cursor: pointer; width: auto !important;
}
.vpc .vpc-link:hover { color: var(--ink) !important; }

.vpc button:focus-visible, .vpc a:focus-visible, .vpc-dialog .vpc-close:focus-visible { outline: 3px solid var(--ink, #0c1e24) !important; outline-offset: 2px !important; }

/* Demo and preview only: what the button would hand over. Never shown to a visitor of a live card. */
.vpc-result { margin-top: 11px; padding: 10px 12px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fbfcfc; font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.vpc-result-row { display: flex; gap: 8px; padding: 2px 0; }
.vpc-result-row b { flex: 0 0 34%; font-weight: 800; color: var(--ink2); }
.vpc-result-row:first-child b { flex: 1 1 auto; color: var(--ink); font-size: 13.5px; }

/* The card opened by a button of the page: in the middle on a computer, rising from the bottom on a phone. */
.vpc-dialog {
	position: fixed; inset: 0; margin: auto; padding: 0; border: 0; border-radius: 16px;
	width: min(440px, calc(100vw - 24px)); max-width: none; height: fit-content; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
	overflow: auto; overscroll-behavior: contain; background: #fff; color: #0c1e24; box-shadow: 0 14px 34px rgba(0, 0, 0, .35);
}
.vpc-dialog::backdrop { background: rgba(12, 30, 36, .62); }
.vpc-dialog-body { padding: 16px; }
.vpc-dialog .vpc-title { padding-right: 44px !important; padding-inline-end: 44px !important; }
.vpc-dialog .vpc-close {
	-webkit-appearance: none !important; appearance: none !important;
	position: absolute; top: 4px; right: 4px; inset-inline-end: 4px; width: 44px !important; height: 44px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important;
	display: flex !important; align-items: center; justify-content: center;
	border: 0 !important; border-radius: 50% !important; background: none !important; box-shadow: none !important;
	color: #33505a !important; font: 400 26px/1 system-ui, sans-serif !important; cursor: pointer; z-index: 1;
}
.vpc-dialog .vpc-close:hover { color: #0c1e24 !important; background: #eef3f3 !important; }
@media (max-width: 600px) {
	.vpc-dialog { margin: auto 0 0; width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 16px 16px 0 0; }
	.vpc-dialog-body { padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: no-preference) {
	.vpc-dialog[open] { animation: vpcUp .2s ease-out; }
	.vpc-dialog[open]::backdrop { animation: vpcFade .2s ease-out; }
}
@keyframes vpcUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes vpcFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .vpc button.vpc-chip { transition: none; } }
