/*
 * WooCommerce's own checkout on the sites that sell through it (/checkout/ of the main site for carts without gift
 * card products, /digital/, /retro/, /xbox-games-us/) and their order confirmation pages. The card checkout of the
 * main site, PS IN and Xbox TR has its own styles in mu-plugins/giftcard-checkout/views/giftcard-checkout/.
 *
 * Moved here 2026-10-22 verbatim from snippet 28 "Checkout page"; loaded where it loaded
 * (gp_storefront_is_classic_checkout()).
 */

:root {
	--gp-checkout-surface: #f3f5f9; /* the order confirmation's; the checkout's own: the dark section below */
	--gp-notice-bg: #ecf8ea;
	--gp-notice-text: #4a9d42;
	--gp-muted: gray;
	--gp-link-hover: #9100ff;
	--gp-accent-purple: #9100ff;
	--gp-highlight: #521e9d;
	--gp-payment-logo: url("https://gamepropaganda.com/wp-content/uploads/2024/05/изображение_2024-05-08_042224338.png");
	--gp-field-callout-bg: #ddd;
	--gp-popup-overlay: rgba(0, 0, 0, 0.5);
	--gp-popup-content-bg: #e7e7e7;
	--gp-icon-checkout: url("https://gamepropaganda.com/wp-content/uploads/2024/10/iconcheckout.png");
}

/* Dark, as the rest of the site and the card checkout (Kirill, 2026-11-13: «накатить темные стили, а то выбивается на
   сайте»). The page-checkout templates of the main site, /digital/, /retro/ (and the card shells', which do not load
   this file) set the page's group to the theme's light primary with secondary (black) text and links; the page takes
   the site's background here instead, the text and the links its primary. The fields, the order panel and the notices
   take the card colour (the variables, set here; :root keeps the light ones). Only where the checkout's form is:
   the order confirmation, which loads this file too, has a light receipt of its own in the same template colours. */
body.woocommerce-checkout:has(form.woocommerce-checkout) .wp-site-blocks .has-primary-background-color {
	background-color: var(--wp--preset--color--background) !important;
}

body.woocommerce-checkout:has(form.woocommerce-checkout) .wp-site-blocks .has-secondary-color {
	color: var(--wp--preset--color--primary) !important;
}

body.woocommerce-checkout:has(form.woocommerce-checkout) .wp-site-blocks .has-secondary-color a:where(:not(.wp-element-button)) {
	color: var(--wp--preset--color--primary);
}

@media (hover: hover) {
	body.woocommerce-checkout:has(form.woocommerce-checkout) .wp-site-blocks .has-secondary-color a:where(:not(.wp-element-button)):hover {
		color: var(--wp--preset--color--accent); /* the templates' own hover */
	}
}

/* The scrollbars and the browser's own controls dark; the ticks and the radios are drawn below */
body.woocommerce-checkout:has(form.woocommerce-checkout) {
	--gp-checkout-surface: var(--wp--preset--color--custom-card-background);
	--gp-notice-bg: var(--wp--preset--color--custom-card-background);
	--gp-notice-text: var(--wp--preset--color--primary);
	--wc-form-color-text: var(--wp--preset--color--primary); /* WooCommerce's fields' text, #000 by default */
	--wc-red: #f44; /* its errors' #a00 dim on the dark page; the card checkout's error red (giftcard-checkout.css) */
	color-scheme: dark;
}

/* Field errors only after the first try to place the order (js/checkout.js sets gp-checkout-tried on the form):
   WooCommerce reddens a row's label as soon as a field is left or a consent unticked. After the try a wrong field
   also gets a red frame, which the transparent frame above had hidden. */
form.woocommerce-checkout:not(.gp-checkout-tried) .form-row.woocommerce-invalid label {
	color: inherit;
}

form.woocommerce-checkout.gp-checkout-tried .form-row.woocommerce-invalid :is(input.input-text, textarea, select) {
	border-color: var(--wc-red) !important;
}

form.woocommerce-checkout.gp-checkout-tried .form-row.woocommerce-invalid input[type="checkbox"] {
	border-color: var(--wc-red);
}

/* WooCommerce's line under a field that the order was refused for («… – обязательное поле»): the red field says it
   (Kirill, 2026-11-13: «подсветки полей достаточно»), as js/checkout.js drops its line from the list above the form.
   Kept for screen readers, which read it as the field's description (aria-describedby). Under a field that is not red
   (the e-mail the anti-fraud check refused) it stays in sight. */
form.woocommerce-checkout .form-row.woocommerce-invalid .checkout-inline-error-message {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* A link in a red label red too: the consents' «условиями» and «политикой» stood in the page's white among red words
   (Kirill, 2026-11-13). With body: the dark checkout's link colour below wins otherwise. */
body form.woocommerce-checkout.gp-checkout-tried .form-row.woocommerce-invalid label a {
	color: var(--wc-red);
}

/* Ticks and radios, drawn by us (Kirill, 2026-11-13: the system ones in the purple accent-color came
   out pink in Safari on iPhone, which re-tints accent-color on dark pages, and an empty radio as a black disc; «зеленый
   может лучше, у инпутов уже он стоит»): 16px, a thin light frame; a ticked box filled with the accent with a dark
   tick, a chosen radio an accent ring round an accent dot, the colour of a focused field's frame (inline-forms.css).
   The consents and the payment methods (the card checkout shows none: its consents are hidden). */
form.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"]) {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	flex: none;
	box-sizing: border-box;
	width: 16px;
	height: 16px;
	margin: 0;
	border: 1.5px solid rgba(231, 231, 231, 0.5);
	border-radius: 4px;
	background: transparent;
	vertical-align: middle;
	cursor: pointer;
	transition: background-color var(--gp-hover-out) ease, border-color var(--gp-hover-out) ease;
}

form.woocommerce-checkout input[type="radio"] {
	border-radius: 50%;
}

/* The tick and the dot fill the box and are drawn in its middle: an input lays out no children, so a ::before left
   inline takes no size */
form.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"])::before {
	content: "";
	display: block;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition: opacity var(--gp-hover-out) ease;
}

form.woocommerce-checkout input[type="checkbox"]::before {
	background: var(--wp--preset--color--background);
	-webkit-mask: var(--gp-icon-check) center / 12px no-repeat;
	mask: var(--gp-icon-check) center / 12px no-repeat;
}

form.woocommerce-checkout input[type="radio"]::before {
	background: radial-gradient(circle, var(--wp--preset--color--accent) 3.5px, transparent 4px);
}

form.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"]):checked {
	border-color: var(--wp--preset--color--accent);
}

form.woocommerce-checkout input[type="checkbox"]:checked {
	background: var(--wp--preset--color--accent);
}

form.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"]):checked::before {
	opacity: 1;
}

form.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"]):focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(197, 255, 0, 0.3); /* the accent at 30 %, the one soft ring (gp-docs design/interface.md) */
}

.woocommerce-checkout .woocommerce-billing-fields a {
	text-underline-offset: 2px; /* as the card checkout's consents */
}

/* No lines in the order panel, and its parts gathered closer instead (Kirill, 2026-11-13: «полоски стоит убрать… на
   мобилке жирные», then «плотнее»): the theme's #ddd under every row and WooCommerce's round the payment methods went;
   "Подытог" and "Итого" stand 8px apart as one group, 12px from the lines above and the methods below, so air parts
   the lines, the totals and the methods. */
.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table :is(tr, th, td),
.woocommerce-checkout #payment ul.payment_methods {
	border: 0 !important;
}

.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table tfoot :is(th, td) {
	padding-top: 4px;
	padding-bottom: 4px;
}

.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table tfoot tr:first-child :is(th, td) {
	padding-top: 12px;
}

.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table tfoot tr:last-child :is(th, td) {
	padding-bottom: 12px;
}

/* Checkout field visibility */
.woocommerce-additional-fields,
.woocommerce-form-login-toggle,
.woocommerce-account-fields,
.awcfe-hidden {
	display: none !important;
}

.checkout_coupon.woocommerce-form-coupon {
	margin: 0 !important;
}

/* The "Ввести промокод" notice, shown to everyone (snippet 72, which showed it only to visitors from Avito but had long
   been overridden by this rule, was removed on 2026-10-22). The field and button themselves: inline-forms.css. */
.woocommerce-form-coupon-toggle {
	display: block !important;
	margin: 0 !important;
}

.checkout-checkboxes {
	display: none;
}

/* Blocks notices: the card colour, an error keeps WooCommerce's red frame and icon (on the checkout only: the order
   confirmation keeps its own) */
body.woocommerce-checkout:has(form.woocommerce-checkout) .wc-block-components-notice-banner:is(.is-info, .is-success, .is-error, .is-warning) {
	background: var(--gp-notice-bg);
	color: var(--gp-notice-text);
}

.wc-block-components-notice-banner.is-info {
	border-color: transparent;
	box-sizing: border-box;
}

.wc-block-components-notice-banner__content {
	color: var(--gp-notice-text);
}

/* FAQ popup (checkout) */
.question-mark {
	cursor: pointer;
	background: var(--gp-accent-purple);
	border-radius: 50px;
	padding: 4px 5px 2px 1px;
	margin-left: 5px;
}

.popupfaqcheckout {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: var(--gp-popup-overlay);
	justify-content: center;
	align-items: center;
}

.popupfaqcheckout.show {
	display: flex;
}

.popup-content {
	background-color: var(--gp-popup-content-bg);
	padding: 20px;
	border-radius: 8px;
	max-width: 600px;
	width: auto;
}

.close-popup {
	cursor: pointer;
	float: right;
	font-size: 26px;
}

/* Checkout field rows */
.form-row.form-row-wide.newaccountp {
	display: none;
	background-color: var(--gp-field-callout-bg);
	padding-left: 10px;
	padding-right: 10px;
	border-radius: 10px;
	color: #000;
	font-size: 13px;
}

.optional {
	display: none;
}

.icon-cloud {
	display: inline-block;
	width: 24px;
	height: 24px;
	background-image: var(--gp-icon-checkout);
	background-size: contain;
	background-repeat: no-repeat;
	margin-right: 5px;
}

.highlighted {
	color: var(--gp-highlight);
	font-weight: bold;
}

.form-row.form-row-wide.accountsonyp,
.form-row.form-row-wide.newaccountxbox,
.form-row.form-row-wide.emailcertif,
.form-row.form-row-wide.textpozdravlenie {
	background-color: var(--gp-field-callout-bg);
	padding-left: 10px;
	padding-right: 10px;
	border-radius: 10px;
	color: #000;
	font-size: 13px;
}

.form-row.form-row-wide.accountsonyp,
.form-row.form-row-wide.emailcertif,
.form-row.form-row-wide.textpozdravlenie {
	display: flex;
}

.checkout_text {
	cursor: default;
}

#payment_method_all {
	display: inline-flex !important;
	pointer-events: none;
}

/* Order review panel + layout */
.woocommerce-checkout > #customer_details {
	width: 50%;
}

.woocommerce-checkout #order_review,
.woocommerce-checkout h3#order_review_heading {
	width: 40%;
}

.woocommerce-checkout #order_review {
	background-color: var(--gp-checkout-surface);
	border-radius: 20px;
	padding: 12px; /* the theme's 30px put the order 43px from the panel's edge on a desktop (Kirill, 2026-11-13:
	                  «паддинги поменьше в блоке "ваш заказ"»); with the lines' own 0.8rem about 25px, near the phone's
	                  2px + 0.8rem (below) */
}

.woocommerce-checkout #payment div.payment_box {
	width: 185px;
	display: none !important;
}

#add_payment_method #payment ul.payment_methods li input,
.woocommerce-cart #payment ul.payment_methods li input,
.woocommerce-checkout #payment ul.payment_methods li input {
	margin: 0 0.5em 0 0;
}

div#order_review span.woocommerce-Price-amount {
	color: inherit;
	font-size: 14px;
	letter-spacing: normal !important;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
	display: none;
}

/* Spacing (Kirill, 2026-11-13: «Ваш заказ слишком далеко от своего блока», «чекбоксы юридические слишком свободно
   стоят»). The blur theme's: 30px under "Ваш заказ", which then stood closer to the checkboxes above it (25px) than
   to its own panel; a 28px line under every 13px label, so a two-line consent read as two loose lines with its second
   one under the box. Now a heading is 12px from what it heads and 32px from what came before (the proximity rule,
   gp-docs design/interface.md); labels at 1.4; the consents 8px apart, their text hanging beside the box. */
.woocommerce-checkout :is(.woocommerce-billing-fields > h3, h3#order_review_heading) {
	margin: 32px 0 12px;
	line-height: 1.2;
}

.woocommerce-checkout .woocommerce-billing-fields > h3:first-child {
	margin-top: 0;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row {
	margin: 0 0 12px; /* the margin only: the call-out rows above keep their 10px inside their grey plate */
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row > label {
	margin-bottom: 6px;
	line-height: 1.4;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row:has(> label > input[type="checkbox"]) {
	margin-bottom: 8px;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row:has(> label > input[type="checkbox"]):first-of-type {
	margin-top: 16px;
}

.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row:has(> label > input[type="checkbox"]) > label {
	position: relative;
	margin: 0;
	padding-left: 26px;
}

/* with the label's position: relative above, under the same :has(), so a browser without :has() keeps both as they
   were rather than stacking the boxes */
.woocommerce-checkout .woocommerce-billing-fields__field-wrapper .form-row:has(> label > input[type="checkbox"]) > label > input[type="checkbox"] {
	position: absolute;
	top: calc((1.4em - 16px) / 2); /* level with the first line */
	left: 0;
	width: 16px;
	height: 16px;
	margin: 0;
}

/* The order panel without its holes: WooCommerce's 24px under the table, 16px over the payment methods and 11px
   under each of their labels, the theme's 30px over the button. One left edge for all of it, the table's 0.8rem
   (the payment list and the support text stood 3px further in). */
.woocommerce-checkout #order_review table.woocommerce-checkout-review-order-table {
	margin-bottom: 0;
}

.woocommerce-checkout #payment ul.payment_methods {
	padding: 8px 0.8rem;
}

.woocommerce-checkout #payment ul.payment_methods li label {
	margin: 0;
}

/* The radio's middle on the middle of its label's capitals (Kirill, 2026-11-13: «неровно стоит с лейблом, текст
   выше»): centred on the 32px line it stood below them, as the capitals sit above a line's middle. Its foot on the
   label's baseline, moved up by half a cap height less half its own 16px, worked out by the browser from the label's
   font (font: inherit) as the price beside the quantity switch is (checkout-items.css). */
.woocommerce-checkout #payment ul.payment_methods li {
	display: flex;
	align-items: baseline;
}

.woocommerce-checkout #payment ul.payment_methods li input[type="radio"] {
	font: inherit;
	transform: translateY(calc(8px - 0.5cap));
}

.woocommerce-checkout #payment div.form-row.place-order {
	margin: 0;
	padding: 12px 0.8rem 0.8rem;
}

.woocommerce-checkout #place_order {
	--gp-button-margin: 16px 0 0;
}

/* Form controls: light on the dark checkout; black, as before, on the order confirmation's light receipt. WooCommerce's
   own (.woocommerce) only: on every control of the page they reached the header, whose «Подписки» took the light
   text on its green (Kirill, 2026-11-13: «задели текст на этой кнопке в шапке»). :where keeps the weights they had. */
:where(.woocommerce) :is(select, button, input, textarea) {
	color: #000;
}

body.woocommerce-checkout:has(form.woocommerce-checkout) :where(.woocommerce) :is(select, button, input, textarea),
.woocommerce-privacy-policy-text {
	color: var(--wp--preset--color--primary);
}

/* «напишите в поддержку» under the ways to pay (Fluent snippet 63) opens the support chat on the page, not another
   page: dashed, as every link that stays on the page (gp-docs design/interface.md; Kirill, 2026-11-13) */
.payment-support-cta a {
	text-decoration-line: underline;
	text-decoration-style: dashed;
}

/* The fields as the coupon field (inline-forms.css): the card colour, no frame until the accent one of focus; text at
   16px, below which Safari on iPhone zooms the page into a field on focus (it was 15px; Kirill, 2026-11-13) */
.woocommerce form .form-row :is(input.input-text, textarea, select),
.woocommerce-billing-fields__field-wrapper textarea {
	font-size: 16px;
}

.woocommerce form .form-row input.input-text,
.woocommerce-billing-fields__field-wrapper textarea {
	border: 1px solid transparent !important;
	background-color: var(--gp-checkout-surface) !important;
	border-radius: 10px !important;
	transition: border-color var(--gp-hover-out) ease;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce-billing-fields__field-wrapper textarea:focus {
	border-color: var(--wp--preset--color--accent) !important;
	outline: none;
}

/* The comment grows only downwards: dragged by its corner it went narrower or wider than the fields above it (Kirill,
   2026-11-13) */
.woocommerce form .form-row textarea {
	resize: vertical;
}

.woocommerce form .form-row input.input-text::placeholder,
.woocommerce-billing-fields__field-wrapper textarea::placeholder {
	color: #7A7A7A;
	opacity: 1;
}

.woocommerce form .form-row select {
	height: 50px;
	border-radius: 10px;
	background: var(--gp-checkout-surface);
}

.woocommerce form.checkout_coupon,
.woocommerce form.login,
.woocommerce form.register {
	padding: 0;
}

.woocommerce-privacy-policy-text,
.wp-elements-12b8a67cfe3a5280c53a5f80e5b056d4 a:where(:not(.wp-element-button)) {
	color: var(--gp-muted);
}

@media (hover: hover) {
	.wp-elements-12b8a67cfe3a5280c53a5f80e5b056d4 a:where(:not(.wp-element-button)):hover {
		color: var(--gp-link-hover);
	}
}

.woocommerce-Price-amount.amount {
	white-space: nowrap;
}



/* Payment method labels: logo via ::before */
.payment_method_cryptocloud p,
.payment_method_all p {
	position: relative;
	color: transparent;
}

.payment_method_cryptocloud p::before,
.payment_method_all p::before {
	content: "";
	background-image: var(--gp-payment-logo);
	background-size: contain !important;
	background-repeat: no-repeat;
	background-position: center;
	width: 260px;
	height: 60px;
	position: absolute;
	top: 0;
	left: 0;
	transform: translate(-54px, -25px);
}

.woocommerce-checkout .wp-block-post-title {
	justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
	.woocommerce-checkout > #customer_details,
	.woocommerce-checkout h3#order_review_heading,
	.woocommerce-checkout #order_review {
		width: 100%;
	}
}

@media only screen and (min-width: 320px) and (max-width: 760px) {
	.woocommerce form .form-row input.input-text,
	.woocommerce form .form-row textarea {
		background: var(--gp-checkout-surface);
		border-radius: 10px;
		width: 100%;
	}

	.woocommerce form .form-row select {
		height: 50px;
		border-radius: 10px;
		width: 100%;
		background: var(--gp-checkout-surface);
	}

	.woocommerce form.checkout_coupon,
	.woocommerce form.login,
	.woocommerce form.register {
		max-width: 100%;
		padding: 0;
	}

	.wc-block-components-notice-banner.is-info {
		background: var(--gp-notice-bg);
		border-color: transparent;
		box-sizing: border-box;
		width: 100%;
	}

	.woocommerce-checkout #order_review {
		padding: 2px;
	}
}

/* «Может, gmail.com? Исправить» under the e-mail field (js/email-domain-hint.js). Not an error: the
   muted 14px of a help line, no red; «Исправить» keeps the customer on the page, so dashed, as every link that stays on
   the page, and it does not change on hover (gp-docs design/interface.md) */
.gp-email-hint {
	display: block;
	margin-top: 6px;
	color: var(--gp-muted);
	font-size: 14px;
	line-height: 1.4;
}

.gp-email-hint:empty {
	display: none;
}

.gp-email-hint__apply {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wp--preset--color--primary);
	font: inherit;
	text-decoration-line: underline;
	text-decoration-style: dashed;
	text-underline-offset: 2px;
	cursor: pointer;
}
