/**
 * Cart-order page: theme bridge + Vigbo fixes (forms/radio/qty/links).
 */

.geory-cart-order {
	width: 100%;
	--DE-common__link-color: rgba(32, 42, 68, 1);
	--DE-common__link-color-hover: rgba(32, 42, 68, 1);
	--DE-form-settings__field-text-color: rgba(32, 42, 68, 1);
	--DE-form-settings__field-border-color: rgba(32, 42, 68, 1);
	--DE-form-settings__field-focus-text-color: rgba(32, 42, 68, 1);
	--DE-form-settings__field-bg-color: rgba(255, 255, 255, 1);
	--DE-form-settings__field-font: 'Montserrat Regular', 'Montserrat', system-ui, sans-serif;
	--DE-form-settings__field-font-size: 12px;
	--DE-form-settings__field-label-font-size: 12px;
	--DE-form-settings__field-letter-spacing: 0.05em;
}

.geory-cart-order .shopCartPage {
	padding-top: clamp(24px, 4vw, 48px);
	padding-bottom: clamp(48px, 6vw, 96px);
}

.geory-cart-order .container.custom__content--max-width {
	max-width: 100%;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.geory-cart-order .form-settings {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.geory-cart-order .md-shopcart,
.geory-cart-order .f__2,
.geory-cart-order .f__3 {
	font-family: var(--geory-font-family, 'Montserrat Regular', 'Montserrat', system-ui, sans-serif);
}

/* Form inputs: Vigbo modifier classes are hooks only (no rules in bundled CSS); ref geory.ru/shop/cart 12px. */
.geory-cart-order input.form__field_ff,
.geory-cart-order textarea.form__field_ff {
	font-family: var(--DE-form-settings__field-font);
}

.geory-cart-order input.form__field_fs,
.geory-cart-order textarea.form__field_fs,
.geory-cart-order .form__placeholder.f__3 {
	font-size: var(--DE-form-settings__field-font-size);
}

.geory-cart-order input.form__field_fw,
.geory-cart-order textarea.form__field_fw {
	font-weight: 400;
	font-style: normal;
}

.geory-cart-order input.form__field_ls,
.geory-cart-order textarea.form__field_ls {
	letter-spacing: var(--DE-form-settings__field-letter-spacing);
}

.geory-cart-order input.form__field_c,
.geory-cart-order textarea.form__field_c {
	color: var(--DE-form-settings__field-text-color);
}

.geory-cart-order .woocommerce-cart-form,
.geory-cart-order .cart-collaterals,
.geory-cart-order .woocommerce-checkout {
	display: none !important;
}

/* Links: Vigbo --DE-common__link-color is empty on geory.ru; WP defaults to blue. */
.geory-cart-order .de--common__link-color a,
.geory-cart-order .de--common__link-color a span,
.geory-cart-order .de--common__link-color a u,
.geory-cart-order .form__info-text a,
.geory-cart-order .shop-promo-link,
.geory-cart-order .form__checkbox_text a {
	color: var(--DE-common__link-color) !important;
	text-decoration-color: rgba(32, 42, 68, 0.45);
}

.geory-cart-order .de--common__link-color a:hover,
.geory-cart-order .de--common__link-color a:hover span,
.geory-cart-order .de--common__link-color a:hover u,
.geory-cart-order .form__info-text a:hover,
.geory-cart-order .shop-promo-link:hover,
.geory-cart-order .form__checkbox_text a:hover {
	color: var(--DE-common__link-color-hover) !important;
}

/* Native inputs hidden (build_cms_front_deferred.css). */
.geory-cart-order input[type='checkbox'],
.geory-cart-order input[type='radio'] {
	display: none;
}

/* Custom radio: circle + label alignment (Vigbo deferred + shop). */
.geory-cart-order .md-shopcart__payment-item.md-shopcart__radio-line,
.geory-cart-order .md-shopcart__radio-line {
	display: flex;
	align-items: flex-start;
}

.geory-cart-order .md-radio + label.md-radio__label-shopcart {
	position: relative;
	display: flex;
	width: 100%;
	padding: 10px 0 10px 42px;
	line-height: 17px;
	cursor: pointer;
	align-items: center;
	box-sizing: border-box;
}

.geory-cart-order .md-radio + label.md-radio__label-shopcart::before {
	content: '';
	display: inline-block;
	width: 6px;
	height: 6px;
	border-radius: 6px;
	background: #eee;
	position: absolute;
	top: 50%;
	left: 7px;
	margin-top: -3px;
	box-shadow: 0 0 0 6px #fff, 0 0 0 7px #c9c7c1;
}

.geory-cart-order .md-radio:checked + label.md-radio__label-shopcart::before {
	background: #4c4c4c;
}

.geory-cart-order .md-radio + label.md-radio__label-shopcart .radio-line__title,
.geory-cart-order .md-radio + label.md-radio__label-shopcart .radio-line__price {
	align-self: center;
}

/* Qty +/-: desktop only — on mobile Vigbo hides controls (geory.ru/shop/cart). */
@media (min-width: 768px) {
	.geory-cart-order .box-number-with-control .control-minus,
	.geory-cart-order .box-number-with-control .control-plus {
		display: block;
		height: auto;
		line-height: 0;
		color: #b3b3b3;
	}

	.geory-cart-order .box-number-with-control .control-minus svg,
	.geory-cart-order .box-number-with-control .control-plus svg {
		display: block;
	}

	.geory-cart-order .box-number-with-control .control-minus svg rect,
	.geory-cart-order .box-number-with-control .control-minus svg path,
	.geory-cart-order .box-number-with-control .control-plus svg path {
		fill: currentColor;
	}

	.geory-cart-order .box-number-with-control .control-minus,
	.geory-cart-order .box-number-with-control .control-plus,
	.geory-cart-order .box-number-with-control .js--control-minus,
	.geory-cart-order .box-number-with-control .js--control-plus {
		cursor: pointer;
		transition: color 0.2s ease;
	}

	.geory-cart-order .box-number-with-control .control-minus:hover,
	.geory-cart-order .box-number-with-control .control-plus:hover,
	.geory-cart-order .box-number-with-control .js--control-minus:hover,
	.geory-cart-order .box-number-with-control .js--control-plus:hover {
		color: #4c4c4c;
	}
}

.geory-cart-order [data-cart-quantity-control].is-quantity-error .box-number__input {
	border-color: #c23c40;
}

.geory-cart-order .md-shopcart__delivery-more-items.hide,
.geory-cart-order [data-payment-panel='pickup'].hide {
	display: none;
}

.geory-cart-order [data-delivery-panel='pickup'].md-shopcart__delivery-more-items {
	margin-top: 0;
}

.geory-cart-order .payment-item__description-text {
	display: block;
	line-height: normal;
	padding-top: 0.5em;
	font-size: inherit;
}

/* Promo slidebox: hidden via build_shop_front.css; visible__2U5OS from main.chunk.css (Vigbo). */
.geory-cart-order .md-shopcart__promocode-promo.is-promo-open .shop-promo-link {
	display: none;
}

/* Flex row (field + «Применить»): in-flow min-content is 0 because inputs are position:absolute. */
.geory-cart-order .md-shopcart__promocode .form__promocode-box .form__field-box {
	flex: 1 1 auto;
	min-width: 12rem;
	max-width: 350px;
	width: 100%;
}

.geory-cart-order .md-shopcart__promocode .form__promocode-box .form__field {
	width: 100%;
}

.geory-cart-order .md-shopcart__promocode .shop-promo-code {
	display: block;
	width: 100%;
	box-sizing: border-box;
}

/* Submit: navy default + gold hover via custom-shop.css [data-cssvariables-styling] .form__btn:after */

.geory-cart-order [data-cssvariables-styling='true'] .form__btn,
.geory-cart-order [data-cssvariables-styling='true'] .form__btn:hover,
.geory-cart-order [data-cssvariables-styling='true'] .form__btn:focus-visible {
	border: none !important;
}

.geory-cart-order [data-cssvariables-styling='true'] .form__btn::after,
.geory-cart-order [data-cssvariables-styling='true'] .form__btn:hover::after,
.geory-cart-order [data-cssvariables-styling='true'] .form__btn:focus-visible::after {
	border: none !important;
}

.geory-cart-order .form-settings[data-field-border-color] ~ * .form__field_bdc[data-border-type='line'] {
	border-color: rgba(32, 42, 68, 1);
}

#checkout-modal-root {
	position: relative;
	z-index: 100;
}

#checkout-modal-root .modal__3hR98:not(.visible__1V7Ua) {
	pointer-events: none;
}

/* Окно «Удалить товар?»: у Vigbo-обёртки есть left/top/transform, но нет position — диалог улетал за экран */
#checkout-modal-root .modal__3hR98.visible__1V7Ua {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
}

#checkout-modal-root .front-modal-wrap {
	position: fixed;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 440px;
	max-width: calc(100vw - 32px);
}

/* Само окно: стили коробки Vigbo (.front-modal) в клонированные CSS не попали — рисуем свои. */
#checkout-modal-root .front-modal {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	padding: 40px 32px 28px;
	background: #fff;
	border-radius: 4px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
	text-align: center;
	font-family: var(--geory-font-family, 'Montserrat Regular', 'Montserrat', system-ui, sans-serif);
	color: #202a44;
}

#checkout-modal-root .front-modal .close-popup {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: none;
	color: #8a8f9a;
	cursor: pointer;
}

#checkout-modal-root .front-modal .close-popup:hover {
	color: #202a44;
}

#checkout-modal-root .front-modal__dialog {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.5;
}

#checkout-modal-root .front-modal__buttons {
	display: flex;
	justify-content: center;
	gap: 12px;
	flex-wrap: wrap;
}

#checkout-modal-root .front-modal__buttons .btn {
	min-width: 140px;
	padding: 12px 22px;
	border: 1px solid #202a44;
	border-radius: 2px;
	font-size: 13px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

#checkout-modal-root .front-modal__buttons .btn-success {
	background: #202a44;
	color: #fff;
}

#checkout-modal-root .front-modal__buttons .btn-success:hover {
	background: #3a4666;
}

#checkout-modal-root .front-modal__buttons .btn-default {
	background: #fff;
	color: #202a44;
}

#checkout-modal-root .front-modal__buttons .btn-default:hover {
	background: #f2f3f6;
}

/* Mobile cart layout — mirrors .adaptive-mobile rules from build_shop_front.css (geory.ru/shop/cart). */
@media (max-width: 767px) {
	.geory-cart-page .woocommerce-main > .layout-shell {
		padding-left: 0;
		padding-right: 0;
	}

	.geory-cart-order {
		overflow-x: clip;
	}

	.geory-cart-order .l-content--box-shop {
		padding-left: 20px;
		padding-right: 20px;
	}

	.geory-cart-order .l-content--box-shop .container {
		padding-left: 0;
		padding-right: 0;
	}

	.geory-cart-order .mod--mobile-hide {
		display: none !important;
	}

	.geory-cart-order .md-shopcart .mod--mobile-hide {
		display: none;
	}

	.geory-cart-order .md-shopcart__grid-head,
	.geory-cart-order .md-shopcart__item-price {
		display: none;
	}

	.geory-cart-order .md-shopcart__grid-item {
		position: relative;
		display: block;
		min-height: 117px;
		overflow: hidden;
	}

	/* Contain floated line amount so the next row is not drawn on top (Vigbo mobile layout). */
	.geory-cart-order .md-shopcart__grid-item::after {
		content: '';
		display: block;
		clear: both;
	}

	.geory-cart-order .md-shopcart__item-photo {
		position: absolute;
	}

	.geory-cart-order .md-shopcart__item-main {
		width: calc(100% - 72px - 25px);
		margin-left: 92px;
		padding-right: 20px;
	}

	.geory-cart-order .md-shopcart__item-delete {
		position: absolute;
		top: 14px;
		right: 0;
		justify-content: flex-end;
	}

	.geory-cart-order .md-shopcart__item-title {
		padding-top: 0;
		margin-bottom: 20px;
	}

	.geory-cart-order .md-shopcart__item-count {
		display: inline-block;
		width: auto;
		margin-left: 92px;
		height: auto;
	}

	/* geory.ru: only quantity number + underline, no +/- */
	.geory-cart-order .box-number-with-control .control-minus,
	.geory-cart-order .box-number-with-control .control-plus,
	.geory-cart-order .box-number-with-control .js--control-minus,
	.geory-cart-order .box-number-with-control .js--control-plus {
		display: none !important;
	}

	.geory-cart-order .md-shopcart__item-amount {
		float: right;
		width: auto;
		min-height: 40px;
		height: auto;
		text-align: right;
		justify-content: flex-end;
		white-space: nowrap;
	}

	.geory-cart-order .md-shopcart__item-total {
		width: 50%;
		text-align: left;
	}

	.geory-cart-order .md-shopcart__grid-footer .md-shopcart__item-total.td-size-xxl {
		text-align: left;
	}

	.geory-cart-order .md-shopcart__grid-footer .md-shopcart__item-total.mod--flex-column__end {
		text-align: right;
		justify-content: flex-end;
	}

	.geory-cart-order .md-shopcart__item-total .item-total__price {
		white-space: nowrap;
	}

	.geory-cart-order .md-shopcart .box-number__input {
		width: 50px;
		height: 40px;
		min-height: 40px;
		padding: 0 5px;
		text-align: center;
	}

	.geory-cart-order .md-shopcart .mod--align-center,
	.geory-cart-order .md-shopcart .mod--align-right {
		text-align: left;
		justify-content: flex-start;
	}

	.geory-cart-order .md-shopcart .mod--align-center.md-shopcart__item-amount,
	.geory-cart-order .md-shopcart .mod--align-center.md-shopcart__item-delete,
	.geory-cart-order .md-shopcart .mod--align-center.md-shopcart__item-total,
	.geory-cart-order .md-shopcart .mod--align-right.md-shopcart__item-amount,
	.geory-cart-order .md-shopcart .mod--align-right.md-shopcart__item-delete,
	.geory-cart-order .md-shopcart .mod--align-right.md-shopcart__item-total {
		text-align: right;
		justify-content: flex-end;
	}

	.geory-cart-order .md-shopcart__line {
		flex-direction: column;
	}

	.geory-cart-order .md-shopcart__promo-summ {
		border: 0;
	}

	.geory-cart-order .md-shopcart__radio-line .md-radio__label-shopcart {
		padding-left: 0;
		padding-right: 0;
	}

	.geory-cart-order .md-shopcart__radio-line .md-radio {
		float: left;
		margin-left: 0;
	}

	.geory-cart-order .md-shopcart__radio-line .radio-line__price {
		width: 40%;
	}

	.geory-cart-order .md-radio + label.md-radio__label-shopcart {
		padding: 10px 0 10px 42px;
	}

	.geory-cart-order .md-radio + label.md-radio__label-shopcart::before {
		left: 7px;
	}

	.geory-cart-order .md-shopcart__total-amount {
		width: 100%;
		text-align: right;
	}

	.geory-cart-order .md-shopcart__total-amount.custom-border-top {
		border-top-width: 1px;
	}

	.geory-cart-order .md-shopcart__promocode {
		width: 100%;
	}

	.geory-cart-order .md-shopcart__promocode .shop-apply-promo {
		margin-right: 0;
	}

	.geory-cart-order .md-shopcart__form {
		flex-direction: column;
		margin-top: 25px;
	}

	.geory-cart-order .md-shopcart__form .form__info,
	.geory-cart-order .md-shopcart__form .form__inputs {
		width: 100%;
	}
}

/* Пустая корзина */
.geory-cart-order .md-shopcart__empty { padding: 2.5rem 0 1rem; text-align: center; }
.geory-cart-order .md-shopcart__empty-text { margin: 0 0 1.2rem; font-size: 14px; letter-spacing: 0.05em; color: #202a44; }
.geory-cart-order .md-shopcart__empty-link { display: inline-block; padding: 12px 40px; background: #202a44; color: #fff; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none; transition: background .25s; }
.geory-cart-order .md-shopcart__empty-link:hover { background: #cabfa5; color: #202a44; }

/* Синхронизация количества с сервером: строка чуть приглушена, но кликабельна */
.geory-cart-order .md-shopcart__grid-item.is-syncing .item-line-amount,
.geory-cart-order .md-shopcart__grid-item.is-syncing .md-shopcart__item-price { opacity: 0.6; transition: opacity .2s; }
.geory-cart-order .md-shopcart__grid-item.is-removing { display: none; }

/* Подсказка под кнопкой выбора пункта СДЭК */
.geory-cart-order .geory-cdek-hint {
	margin: 10px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: #6b7080;
}

.geory-cart-order .geory-cdek-hint__icon {
	display: inline-block;
	padding: 0 4px;
	border: 1px solid #c9ccd4;
	border-radius: 3px;
	font-size: 11px;
	line-height: 1.3;
}
