/* MV Gallery PRO checkout -- theme 0.7.0 UI redesign.
   Scoped to .mv-checkout / .mv-co-*; the shared .mv-field* and .mv-gallery-checkout-form rules in the
   storefront stylesheet (also used by the withdrawal page) are intentionally not touched.
   Palette reuses the MV Software identity: navy #071b4b, blue #1268ff, light #f6f9ff.
   Contrast (WCAG 2.x, computed): navy text on white 16.6:1, body text 10.2:1, muted 6.1:1, input border
   3.4:1 on white, error text 6.6:1, white on button blue 4.7:1 (button is 18px bold = large text). */

.mv-checkout {
	--co-navy: #071b4b;
	--co-text: #33415c;
	--co-muted: #56637a;
	--co-blue: #1268ff;
	--co-blue-dark: #0b57e0;
	--co-border: #d5deeb;
	--co-divider: #e6ecf5;
	--co-input: #7d8ba6;
	--co-soft: #f4f7fc;
	--co-tint: #eaf3ff;
	--co-err: #b42318;
	--co-err-text: #8a1c12;
	--co-err-bg: #fff4f2;
	--co-err-line: #f0b8b1;
	--co-ok: #0a7a43;

	padding: 40px 0 44px;
	background: linear-gradient(180deg, #f6f9ff 0%, #ffffff 100%);
	border-top: 1px solid var(--co-divider);
	color: var(--co-text);
	scroll-margin-top: 72px;
}

.mv-checkout [hidden] { display: none !important; }
.mv-checkout__inner { max-width: 1040px; }

.mv-checkout__head { margin: 0 0 24px; }
.mv-checkout__head h2 { margin: 0 0 6px; font-size: clamp(28px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.03em; color: var(--co-navy); }
.mv-checkout__head p { margin: 0; font-size: 17px; line-height: 1.5; color: var(--co-muted); }

/* ---------- Cards ---------- */
.mv-co-card {
	padding: 26px 28px;
	background: #fff;
	border: 1px solid var(--co-border);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(7, 27, 75, .04), 0 10px 28px rgba(22, 75, 160, .07);
}

.mv-co-card__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 19px; line-height: 1.25; letter-spacing: -.01em; color: var(--co-navy); }
.mv-co-card__title .mv-co-icon { color: var(--co-blue); }
.mv-co-card__intro { margin: 0 0 20px; font-size: 15px; line-height: 1.5; color: var(--co-muted); }

.mv-co-icon { flex: none; width: 20px; height: 20px; }

.mv-co-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; margin-bottom: 24px; }
.mv-co-form { display: grid; gap: 24px; }

/* ---------- Product summary ---------- */
.mv-co-summary .mv-co-card__title { margin-bottom: 14px; }
.mv-co-product { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.mv-co-product__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 12px; background: var(--co-tint); color: var(--co-blue); }
.mv-co-product__icon .mv-co-icon { width: 24px; height: 24px; }
.mv-co-product__name { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.25; color: var(--co-navy); }
.mv-co-product__tagline { margin: 2px 0 0; font-size: 14px; line-height: 1.4; color: var(--co-muted); }

.mv-co-facts { margin: 0; }
.mv-co-facts > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 4px 16px; align-items: start; padding: 11px 0; border-top: 1px solid var(--co-divider); }
.mv-co-facts dt { display: flex; align-items: center; gap: 8px; min-height: 24px; font-size: 14px; font-weight: 600; color: var(--co-muted); }
.mv-co-facts dt .mv-co-icon { width: 18px; height: 18px; color: var(--co-blue); }
.mv-co-facts dd { margin: 0; min-height: 24px; font-size: 15px; line-height: 24px; color: var(--co-navy); }
.mv-co-facts dd strong { font-size: 17px; }
.mv-co-facts dd:has(.mv-co-facts__note), .mv-co-facts dd:not(:has(strong)) { line-height: 1.45; padding-top: 2px; }
.mv-co-facts__note { display: block; margin-top: 2px; font-size: 13px; color: var(--co-muted); }

/* ---------- Secure payment ---------- */
.mv-co-secure { background: linear-gradient(180deg, #f8fbff 0%, #ffffff 70%); }
.mv-co-secure .mv-co-card__title { margin-bottom: 10px; }
.mv-co-secure__lead { margin: 0 0 12px; font-size: 15px; line-height: 1.5; color: var(--co-text); }
.mv-co-trust { margin: 0; padding: 0; list-style: none; }
.mv-co-trust li { display: flex; align-items: flex-start; gap: 10px; padding: 14px 0; border-top: 1px solid var(--co-divider); font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--co-navy); }
.mv-co-trust .mv-co-icon { margin-top: 1px; color: var(--co-ok); }

/* ---------- Fields ---------- */
.mv-co-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.mv-co-span-2 { grid-column: 1 / -1; }
.mv-co-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 20px; }

.mv-co-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.mv-co-field label,
.mv-co-field legend { padding: 0; font-size: 14px; font-weight: 700; line-height: 1.3; color: var(--co-navy); }
.mv-co-optional { margin-left: 6px; font-size: 13px; font-weight: 500; color: var(--co-muted); }

.mv-co-field input[type="text"],
.mv-co-field input[type="email"],
.mv-co-field select {
	box-sizing: border-box;
	width: 100%;
	min-height: 46px;
	padding: 0 14px;
	border: 1px solid var(--co-input);
	border-radius: 10px;
	background: #fff;
	color: var(--co-navy);
	font: inherit;
	font-size: 16px;
	line-height: 1.3;
	transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}

.mv-co-field input:hover:not([readonly]):not([aria-invalid="true"]),
.mv-co-field select:hover { border-color: #5a6b8c; }

.mv-co-field input:focus,
.mv-co-field select:focus {
	outline: 2px solid transparent; /* stays visible in forced-colors mode */
	border-color: var(--co-blue);
	box-shadow: 0 0 0 3px rgba(18, 104, 255, .32);
}

.mv-co-field input[readonly] { border-color: var(--co-border); background: #eef2f8; color: var(--co-text); cursor: default; font-weight: 600; }

.mv-co-field input[aria-invalid="true"],
.mv-co-country.has-error input { border-color: var(--co-err); background: var(--co-err-bg); }
.mv-co-field input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .28); }

.mv-co-help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--co-muted); }

.mv-co-error { display: flex; align-items: flex-start; gap: 6px; margin: 0; font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--co-err); }
.mv-co-error .mv-co-icon { width: 16px; height: 16px; margin-top: 2px; }
.mv-co-error:focus { outline: none; }

/* ---------- Buying as (radio cards) ---------- */
.mv-co-fieldset legend { margin-bottom: 8px; }
.mv-co-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mv-co-choice { position: relative; display: block; cursor: pointer; }
.mv-co-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.mv-co-choice__body {
	display: flex; align-items: center; gap: 10px;
	min-height: 48px; padding: 0 16px;
	border: 1px solid var(--co-input); border-radius: 10px; background: #fff;
	font-size: 15px; font-weight: 700; color: var(--co-navy);
	transition: border-color .12s ease, background-color .12s ease, box-shadow .12s ease;
}
.mv-co-choice__body::before { content: ""; flex: none; width: 18px; height: 18px; border: 2px solid var(--co-input); border-radius: 50%; background: #fff; }
.mv-co-choice__body .mv-co-icon { color: var(--co-muted); }
.mv-co-choice:hover .mv-co-choice__body { border-color: #5a6b8c; }
.mv-co-choice input:checked + .mv-co-choice__body { border-color: var(--co-blue); background: #eef5ff; box-shadow: 0 0 0 1px var(--co-blue); }
.mv-co-choice input:checked + .mv-co-choice__body::before { border-color: var(--co-blue); background: var(--co-blue); box-shadow: inset 0 0 0 3px #fff; }
.mv-co-choice input:checked + .mv-co-choice__body .mv-co-icon { color: var(--co-blue); }
.mv-co-choice input:focus-visible + .mv-co-choice__body { outline: 3px solid var(--co-blue); outline-offset: 2px; }

/* ---------- Consents ---------- */
.mv-co-consents { display: grid; gap: 12px; margin-top: 12px; }
.mv-co-consent { border: 1px solid var(--co-border); border-radius: 12px; background: #fff; transition: border-color .12s ease, background-color .12s ease; }
.mv-co-consent:has(input:checked) { border-color: #9dbcf5; background: #f6faff; }
.mv-co-consent:has(input:focus-visible) { border-color: var(--co-blue); box-shadow: 0 0 0 3px rgba(18, 104, 255, .28); }
.mv-co-consent.has-error { border-color: var(--co-err); background: var(--co-err-bg); }
.mv-co-check { display: flex; align-items: flex-start; gap: 14px; padding: 15px 16px; cursor: pointer; font-size: 15px; line-height: 1.5; color: var(--co-text); }
.mv-co-check input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--co-blue); cursor: pointer; }
.mv-co-check a { color: var(--co-blue-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.mv-co-consent .mv-co-error { padding: 0 16px 13px 52px; margin-top: -4px; }

/* ---------- Order summary (Act 108/2024 Coll. Sec 17(3) block) + withdrawal info paragraph ---------- */
.mv-co-order-summary { margin: 0 0 18px; padding: 16px 18px; border: 1px solid var(--co-border); border-radius: 12px; background: #f8fafc; font-size: 14.5px; line-height: 1.55; color: var(--co-text); }
.mv-co-order-summary__title { margin: 0 0 8px; font-weight: 700; font-size: 15px; color: var(--co-navy); }
.mv-co-order-summary p { margin: 0 0 8px; }
.mv-co-order-summary p:last-child { margin-bottom: 0; }
.mv-co-withdrawal-info { margin: 0 0 14px; font-size: 14px; line-height: 1.55; color: var(--co-muted); }
.mv-co-withdrawal-info a { color: var(--co-blue-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Language switcher ---------- */
.mv-lang-switch { margin: 0 0 10px; font-size: 14px; }
.mv-lang-switch a { color: var(--co-muted); text-decoration: underline; text-underline-offset: 2px; }
.mv-lang-switch a.is-current { color: var(--co-navy); font-weight: 700; text-decoration: none; }

/* ---------- Form-level messages ---------- */
.mv-co-summary-errors:empty { display: none; }
.mv-co-summary-errors,
.mv-co-alert { margin-top: 16px; padding: 14px 16px; border: 1px solid var(--co-err-line); border-radius: 12px; background: var(--co-err-bg); color: var(--co-err-text); font-size: 15px; line-height: 1.5; }
.mv-co-summary-errors:focus,
.mv-co-alert:focus { outline: 3px solid var(--co-err); outline-offset: 2px; }
.mv-co-summary-errors p,
.mv-co-alert p { margin: 0; font-weight: 700; }
.mv-co-summary-errors ul { margin: 6px 0 0; padding-left: 20px; }
.mv-co-summary-errors a { color: var(--co-err-text); font-weight: 600; text-decoration: underline; }
.mv-co-alert { display: flex; align-items: flex-start; gap: 10px; }
.mv-co-alert .mv-co-icon { margin-top: 2px; color: var(--co-err); }

/* ---------- Pay button ---------- */
.mv-co-pay {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	box-sizing: border-box; width: 100%; min-height: 58px; margin-top: 20px; padding: 0 24px;
	border: 0; border-radius: 12px;
	background: var(--co-blue); color: #fff;
	font: inherit; font-size: 18px; font-weight: 800; line-height: 1.2; letter-spacing: -.005em;
	cursor: pointer;
	box-shadow: 0 10px 22px rgba(18, 104, 255, .28);
	transition: background-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.mv-co-pay .mv-co-icon { width: 20px; height: 20px; }
.mv-co-pay:hover { background: var(--co-blue-dark); box-shadow: 0 12px 26px rgba(11, 87, 224, .34); transform: translateY(-1px); }
.mv-co-pay:active { transform: none; }
.mv-co-pay:focus-visible { outline: 3px solid var(--co-navy); outline-offset: 3px; }
.mv-co-pay:disabled { background: #dfe6f2; color: #4a5872; box-shadow: none; cursor: not-allowed; transform: none; }
.mv-co-pay[aria-disabled="true"] { cursor: progress; transform: none; }
.mv-co-pay.is-loading { background: var(--co-blue-dark); box-shadow: none; }

.mv-co-spinner { display: none; flex: none; width: 20px; height: 20px; border: 3px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; }
.mv-co-pay.is-loading .mv-co-spinner { display: inline-block; animation: mv-co-spin .8s linear infinite; }
.mv-co-pay.is-loading .mv-co-icon { display: none; }
@keyframes mv-co-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
	.mv-co-pay.is-loading .mv-co-spinner { animation: none; border-top-color: rgba(255, 255, 255, .4); border-right-color: #fff; }
	.mv-co-pay, .mv-co-field input, .mv-co-field select, .mv-co-choice__body, .mv-co-consent { transition: none; }
	.mv-co-pay:hover { transform: none; }
}

.mv-co-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.mv-co-footnote { margin-top: 16px; text-align: center; font-size: 13.5px; line-height: 1.5; color: var(--co-muted); }
.mv-co-footnote p { margin: 0 0 2px; }
.mv-co-footnote a { color: var(--co-blue-dark); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.mv-co-footnote a:hover { color: var(--co-navy); }
.mv-co-footnote a:focus-visible { outline: 3px solid var(--co-blue); outline-offset: 2px; border-radius: 3px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
	.mv-co-top { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
	.mv-co-form { gap: 20px; }
}

@media (max-width: 640px) {
	.mv-checkout { padding: 28px 0 40px; }
	.mv-checkout__head { margin-bottom: 18px; }
	.mv-checkout__head p { font-size: 16px; }
	.mv-co-card { padding: 20px; border-radius: 14px; }
	.mv-co-grid, .mv-co-row3 { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.mv-co-facts > div { grid-template-columns: 100px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
	.mv-co-consent .mv-co-error { padding-left: 52px; }
	.mv-co-card__intro { margin-bottom: 16px; }
}

@media (max-width: 400px) {
	.mv-co-card { padding: 16px; }
	.mv-co-facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.mv-co-choices { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.mv-co-check { gap: 12px; padding: 14px; }
	.mv-co-consent .mv-co-error { padding: 0 14px 12px 48px; }
	.mv-co-pay { font-size: 17px; padding: 0 16px; }
}

@media (forced-colors: active) {
	.mv-co-choice input:checked + .mv-co-choice__body { outline: 2px solid Highlight; }
	.mv-co-pay { border: 2px solid ButtonText; }
}
