/* Opt-in button system. The block wrapper selects appearance, size and hover accent.
   Layout belongs to the surrounding block. Homepage, header, cart and checkout actions, the gp-forms submit button, the
   catalog filter panel's buttons and the cookie notice's «Принять» opt into these variants. */

/* Two sizes for text buttons (Kirill, 2026-11-16): the regular one, 50px with 18px text, on a phone 44px with 16px
   text (14px up to 360px), and the compact one, 36px with 14px text everywhere. Before there were three: a regular 48px
   with 16px text no page used but the 404, a large 50px that turned 44px on a phone, so there the large one stood below
   the regular one. The regular one is the old large one; the class gp-button--large is left in blocks and does nothing
   until the blocks' migration takes it out. The defaults sit on :root, so a variant or an adapter set on the button or
   on its block wrapper overrides them. */
:root {
	--gp-button-height: 50px;
	--gp-button-padding-block: 10px;
	--gp-button-font-size: 18px;
}
@media (max-width: 781px) {
	:root {
		--gp-button-height: 44px;
		--gp-button-padding-block: 8px; /* 22px line + 2 x 8px + 2 x 2px border = 42px, the min-height makes it 44px */
		--gp-button-font-size: 16px;
		--gp-button-line-height: 22px;
		--gp-button-padding-inline: 12px;
	}
}
@media (max-width: 360px) {
	:root {
		--gp-button-font-size: 14px;
	}
}

.wp-block-button.gp-button { display: flex; }

.wp-block-button.gp-button > .wp-block-button__link,
header .btn-subscriptions,
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button),
.woocommerce #payment #place_order,
.psplusproduct .psplusbutton .wc-block-components-product-button__button,
.woocommerce div.product form.cart button.single_add_to_cart_button,
button#toggleEditionsList,
.gp-form__submit,
.woof-slide-out-div .woof_submit_search_form_container button,
#cookieButton {
	box-sizing: border-box;
	margin: var(--gp-button-margin, 0);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--gp-button-gap, 8px);
	min-height: var(--gp-button-height, 50px);
	padding: var(--gp-button-padding-block, 10px) var(--gp-button-padding-inline, 24px);
	padding-inline-start: var(--gp-button-padding-start, var(--gp-button-padding-inline, 24px));
	cursor: pointer;
	border: var(--gp-button-border-width, 2px) solid var(--gp-button-border, transparent);
	border-radius: 999px;
	background: var(--gp-button-background);
	color: var(--gp-button-label-color, var(--gp-button-text, #121212));
	font-family: Onest, sans-serif;
	font-size: var(--gp-button-font-size, 16px);
	font-weight: 500;
	font-style: normal;
	line-height: var(--gp-button-line-height, 24px);
	letter-spacing: normal;
	text-transform: var(--gp-button-text-transform, none);
	text-decoration: none;
	text-align: center;
	white-space: var(--gp-button-white-space, normal);
	opacity: 1;
	box-shadow: none;
	transition: border-color var(--gp-hover-out, .5s) ease, box-shadow var(--gp-hover-out, .5s) ease;
}
.gp-button--accent, .psplusproduct .psplusbutton .wc-block-components-product-button__button, header .btn-subscriptions,
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button),
.gp-form__submit, #cookieButton, .woof-slide-out-div .woof_submit_search_form_container button.woof_submit_search_form { --gp-button-background: var(--wp--preset--color--accent, #c5ff00); }
.gp-button--light { --gp-button-background: var(--wp--preset--color--secbackground, #f6f6f6); }
.gp-button--glow-green, .psplusproduct .psplusbutton .wc-block-components-product-button__button, header .btn-subscriptions,
.wp-block-woocommerce-cart .wc-block-cart__submit-button,
.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button),
.gp-form__submit, #cookieButton, .woof-slide-out-div .woof_submit_search_form_container button.woof_submit_search_form {
	--gp-button-hover-shadow: 0 0 10px rgb(197 255 0 / .8), 0 0 24px rgb(197 255 0 / .4);
}
@media (hover: hover) {
	.wp-block-button.gp-button > .wp-block-button__link:hover,
	header .btn-subscriptions:hover,
	.wp-block-woocommerce-cart .wc-block-cart__submit-button:not([aria-disabled="true"]):not([disabled]):hover,
	.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button):not([aria-disabled="true"]):not([disabled]):hover,
	.woocommerce #payment #place_order:not(:disabled):not([aria-disabled="true"]):hover,
	.psplusproduct .psplusbutton .wc-block-components-product-button__button:not(:disabled):not([aria-disabled="true"]):hover,
	.woocommerce div.product form.cart button.single_add_to_cart_button:not(:disabled):not([aria-disabled="true"]):hover,
	button#toggleEditionsList:not(:disabled):not([aria-disabled="true"]):hover,
	.gp-form:not(.is-busy) .gp-form__submit:hover,
	.woof-slide-out-div .woof_submit_search_form_container button:hover,
	#cookieButton:hover {
		color: var(--gp-button-label-color, var(--gp-button-text, #121212));
		border-color: var(--gp-button-hover-border, transparent);
		--gp-button-pointer-shadow: var(--gp-button-hover-shadow, none);
		box-shadow: var(--gp-button-pointer-shadow);
		transition-duration: var(--gp-hover-in, .12s);
	}
}
@media (prefers-reduced-motion: reduce) {
	.wp-block-button.gp-button > .wp-block-button__link,
	header .btn-subscriptions,
	.wp-block-woocommerce-cart .wc-block-cart__submit-button,
	.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button),
	.woocommerce #payment #place_order,
	.psplusproduct .psplusbutton .wc-block-components-product-button__button,
	.woocommerce div.product form.cart button.single_add_to_cart_button,
	button#toggleEditionsList,
	.gp-form__submit,
	.woof-slide-out-div .woof_submit_search_form_container button,
	#cookieButton { transition: none; }
}

/* Stable selector adapters for the header shortcode, the cookie notice's «Принять» (Fluent snippet 214) and the social
   pills by the newsletter form (below); the same compact variant is reusable. */
.gp-button--compact, header .btn-subscriptions, #cookieButton, .wp-block-social-links.blockotzivi {
	--gp-button-font-size: 14px;
	--gp-button-height: 36px;
	--gp-button-line-height: 18px;
	--gp-button-padding-block: 6px;
	--gp-button-padding-inline: 14px;
	--gp-button-white-space: nowrap;
}

.gp-button--purple, .woocommerce #payment #place_order {
	--gp-button-background: var(--wp--preset--color--custom-accent-purple, #9100ff);
	--gp-button-text: #fff;
}
/* The catalog filter panel's «Сбросить» beside its accent «Фильтровать» (shortcodes/gp-woof/gp-woof.css): the sorting
   pill's grey, the label in the text's colour, its border lighting up under the pointer */
.woof-slide-out-div .woof_submit_search_form_container button.woof_reset_search_form {
	--gp-button-background: var(--gp-surface-raised);
	--gp-button-text: var(--wp--preset--color--primary, #fff);
	--gp-button-hover-border: rgb(255 255 255 / .3);
}
/* Both panel buttons carry WooCommerce's class "button", which the theme (blur) paints accent with a dark label on
   hover and focus (.woocommerce button.button:hover, three classes, more than the lists above): «Сбросить» turned
   accent with a white label under the pointer. They keep their own background and label. */
.woof-slide-out-div .woof_submit_search_form_container button.button:is(:hover, :focus) {
	background: var(--gp-button-background);
	color: var(--gp-button-label-color, var(--gp-button-text, #121212));
}
.gp-button--glow-purple, .woocommerce #payment #place_order {
	--gp-button-hover-shadow: 0 0 10px rgb(145 0 255 / .8), 0 0 24px rgb(145 0 255 / .4);
}

/* The labeled social links by the newsletter form (core/social-links with the class blockotzivi: Telegram, ВКонтакте,
   MAX) are compact buttons (Kirill, 2026-11-16): the compact height and text (the variables above), the icon 18px and
   6px from its label (the icons themselves: social-icons.php). The pill is the item, whose accent background and
   radius come from the block; its link carries the paddings. On a phone the icon is 16px and the paddings narrower, so
   the three keep to one row at 375px; narrower still, MAX wraps under them. They start at the left edge as the card's
   text does: the block's own alignright put them at the right one. Fluent snippet 83 zeroes every social block's gap
   with !important, hence the one here; it makes every social link's background transparent with !important too, over
   the block's own colour class, so that class is restated below a step stronger. The theme's "a { transition: .5s }" would animate every change of size, so the
   link has none; the item keeps only the glow's. WordPress scales a social link up on hover; these do not, as that
   would push into the next one. */
.wp-block-social-links.blockotzivi {
	--gp-social-icon: 18px;
	--gp-social-padding-start: 12px;
	--gp-social-padding-end: 14px;
	gap: 10px !important;
	justify-content: flex-start;
}
.wp-block-social-links.blockotzivi > .wp-social-link,
.wp-block-social-links.blockotzivi > .wp-social-link:hover {
	margin: 0;
	padding: 0;
	transform: none;
	transition: box-shadow var(--gp-hover-out, .5s) ease;
}
.wp-block-social-links.blockotzivi > .wp-social-link.has-accent-background-color {
	background-color: var(--wp--preset--color--accent, #c5ff00) !important;
}
.wp-block-social-links.blockotzivi > .wp-social-link > a {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: var(--gp-button-height, 36px);
	padding: 0 var(--gp-social-padding-end) 0 var(--gp-social-padding-start);
	border-radius: inherit; /* the focus ring follows the pill */
	transition: none;
}
.wp-block-social-links.blockotzivi > .wp-social-link > a > svg {
	flex: none;
	width: var(--gp-social-icon);
	height: var(--gp-social-icon);
}
.wp-block-social-links.blockotzivi > .wp-social-link > a > .wp-block-social-link-label {
	margin: 0;
	padding: 0;
	font-family: Onest, sans-serif;
	font-size: var(--gp-button-font-size, 14px);
	font-weight: 500;
	line-height: var(--gp-button-line-height, 18px);
}
@media (max-width: 781px) {
	.wp-block-social-links.blockotzivi {
		--gp-social-icon: 16px;
		--gp-social-padding-start: 10px;
		--gp-social-padding-end: 12px;
		gap: 6px !important;
	}
}
@media (hover: hover) {
	.wp-block-social-links.blockotzivi > .wp-social-link:hover {
		box-shadow: 0 0 10px rgb(197 255 0 / .8), 0 0 24px rgb(197 255 0 / .4);
		transition-duration: var(--gp-hover-in, .12s);
	}
}

/* Native WooCommerce controls retain their layout and loading content; only their appearance is shared. */
.wp-block-woocommerce-cart .wc-block-cart__submit-button:focus-visible,
.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button):focus-visible,
.woocommerce #payment #place_order:focus-visible,
.psplusproduct .psplusbutton .wc-block-components-product-button__button:focus-visible,
.woocommerce div.product form.cart button.single_add_to_cart_button:focus-visible,
button#toggleEditionsList:focus-visible,
.gp-form__submit:focus-visible,
#cookieButton:focus-visible,
.wp-block-social-links.blockotzivi > .wp-social-link > a:focus-visible {
	outline: 2px solid var(--gp-button-focus, var(--wp--preset--color--accent, #c5ff00));
	outline-offset: 3px;
}
.wp-block-woocommerce-cart .wc-block-cart__submit-button[aria-disabled="true"],
.wp-block-woocommerce-mini-cart-contents :is(.wp-block-woocommerce-mini-cart-checkout-button-block, .wc-block-mini-cart__shopping-button)[aria-disabled="true"],
.woocommerce #payment #place_order:disabled,
.woocommerce #payment #place_order[aria-disabled="true"],
.psplusproduct .psplusbutton .wc-block-components-product-button__button:disabled,
.psplusproduct .psplusbutton .wc-block-components-product-button__button[aria-disabled="true"],
.woocommerce div.product form.cart button.single_add_to_cart_button:is(:disabled, [aria-disabled="true"]),
button#toggleEditionsList:is(:disabled, [aria-disabled="true"]) {
	cursor: default;
	opacity: .5;
}

.gp-button--coral {
	--gp-button-background: #fd5457;
	--gp-button-text: #f6f6f6;
}
.gp-button--glow-coral {
	--gp-button-hover-shadow: 0 0 10px rgb(253 84 87 / .8), 0 0 24px rgb(253 84 87 / .4);
}

/* Product actions keep their 16px text at every width: 18px may not fit "добавить в корзину" in the 220px buttons
   (product.css). Their phone padding stays 24px, the toggle's below is its own. */
.woocommerce div.product form.cart button.single_add_to_cart_button,
button#toggleEditionsList {
	--gp-button-font-size: 16px;
	--gp-button-line-height: 24px;
	--gp-button-padding-inline: 24px;
}

/* Product actions retain their light/dark appearance and purple frame. */
.gp-button--dark, .woocommerce div.product form.cart button.single_add_to_cart_button {
	--gp-button-background: var(--wp--preset--color--background, #121212);
	--gp-button-text: var(--wp--preset--color--primary, #e7e7e7);
}
button#toggleEditionsList {
	--gp-button-gap: var(--gp-dropdown-gap, 8px);
	--gp-button-background: var(--wp--preset--color--secbackground, #f6f6f6);
	--gp-button-border: var(--wp--preset--color--secondary, #000);
}
.woocommerce div.product form.cart button.single_add_to_cart_button {
	--gp-button-text-transform: lowercase;
}
.gp-button--outline {
	--gp-button-background: transparent;
	--gp-button-border: var(--wp--preset--color--secondary, #000);
}
.gp-button--glow-purple-frame,
.woocommerce div.product form.cart button.single_add_to_cart_button,
button#toggleEditionsList {
	--gp-button-hover-border: var(--wp--preset--color--custom-accent-purple, #9100ff);
	--gp-button-hover-shadow: 0 0 10px var(--wp--preset--color--custom-accent-purple, #9100ff);
	--gp-button-focus: var(--wp--preset--color--custom-accent-purple, #9100ff);
}

@media (max-width: 480px) {
	/* The sticky purchase action is accented; the in-page action (the editions) is outlined. */
	.woocommerce div.product form.cart button.single_add_to_cart_button {
		--gp-button-text-transform: none;
		--gp-button-background: var(--wp--preset--color--accent, #c5ff00);
		--gp-button-text: #121212;
		--gp-button-hover-border: transparent;
		--gp-button-hover-shadow: 0 0 10px rgb(197 255 0 / .8), 0 0 24px rgb(197 255 0 / .4);
	}
	button#toggleEditionsList {
		--gp-button-background: transparent;
		--gp-button-text: #e7e7e7;
		--gp-button-border: #e7e7e7;
		--gp-button-border-width: 1px;
		--gp-button-font-size: 14px;
		--gp-button-line-height: 20px;
		--gp-button-padding-inline: 8px;
	}
}

/* Keep each action's words and price together; only the outer action row may wrap. */
.gp-button__label {
	white-space: nowrap;
}
