/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* Оформление заказа: самовывоз / доставка */
.avrora-delivery-type-field {
	--avrora-accent: #f25a21;
	--avrora-accent-soft: rgba(242, 90, 33, 0.12);
	--avrora-border: #e3e3e3;
	--avrora-text-muted: #5c5c5c;
	margin: 1.25rem 0 1.75rem;
	padding: 0;
	background: none;
	border: none;
	border-radius: 0;
}

.avrora-delivery-type-field .avrora-delivery-type-heading {
	margin: 0 0 1rem;
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #444;
}

.avrora-delivery-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.avrora-delivery-address-wrap {
	margin-top: 1rem;
}

.avrora-delivery-address-wrap[hidden] {
	display: none !important;
}

.avrora-delivery-address-field textarea.input-text {
	width: 100%;
	min-height: 5.5em;
	box-sizing: border-box;
}

.avrora-delivery-card {
	position: relative;
	display: block;
	margin: 0;
	padding: 1rem 1.1rem 1rem 1rem;
	border: 2px solid #e5e5e5;
	background: #fff;
	border-radius: 5px;
	cursor: pointer;
	overflow: hidden;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.avrora-delivery-card:hover {
	border-color: #cfcfcf;
}

.avrora-delivery-card.is-selected {
	/* border-color: var(--avrora-accent); */
}

/* Растягиваем радио на всю карточку — клики всегда переключают вариант (иначе pointer-events ломали выбор). */
.avrora-delivery-card input[type="radio"] {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 3;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	opacity: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
}

.avrora-delivery-card__row-top {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 0;
	pointer-events: none;
}

.avrora-delivery-card--pickup .avrora-delivery-card__row-top {
	margin-bottom: 0.75rem;
}

.avrora-delivery-card__radio-fake {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	border: 2px solid #b8b8b8;
	border-radius: 50%;
	margin-top: 3px;
	position: relative;
	box-sizing: border-box;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.avrora-delivery-card:hover .avrora-delivery-card__radio-fake {
	border-color: #888;
}

.avrora-delivery-card.is-selected .avrora-delivery-card__radio-fake {
	border-color: var(--avrora-accent);
}

.avrora-delivery-card.is-selected .avrora-delivery-card__radio-fake::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 8px;
	height: 8px;
	margin: -4px 0 0 -4px;
	background: var(--avrora-accent);
	border-radius: 50%;
}

.avrora-delivery-card__title {
	flex: 1;
	font-weight: 700;
	font-size: 1.0625rem;
	color: var(--avrora-accent);
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.avrora-delivery-card__price {
	font-weight: 700;
	font-size: 0.8125rem;
	color: var(--avrora-accent);
	white-space: nowrap;
	padding: 0.35em 0.65em;
	border-radius: 6px;
	background: var(--avrora-accent-soft);
	line-height: 1.2;
	align-self: flex-start;
}

.avrora-delivery-card__address-row {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 0.85rem;
	padding: 0.65rem 0.75rem;
	font-size: 0.875rem;
	color: var(--avrora-text-muted);
	line-height: 1.5;
	background: #f7f7f7;
	border-radius: 8px;
	border: 1px solid #ededed;
	pointer-events: none;
}

.avrora-delivery-card__address-row svg {
	flex-shrink: 0;
	margin-top: 1px;
	color: #8a8a8a;
	opacity: 1;
}

.avrora-delivery-card__hint {
	position: relative;
	z-index: 1;
	margin: 0;
	padding-top: 0.65rem;
	border-top: 1px dashed #e5e5e5;
	font-size: 0.8125rem;
	line-height: 1.45;
	color: var(--avrora-accent);
	font-weight: 500;
	pointer-events: none;
}

@media (min-width: 480px) {
	.avrora-delivery-options {
		gap: 16px;
	}

	.avrora-delivery-card {
		padding: 1.15rem 1.25rem 1.1rem 1.1rem;
	}
}

/* Скрыть колонку / блок адреса доставки при самовывозе (класс вешает JS на form.checkout) */
form.checkout.avrora-mode-pickup #customer_details .col-2,
form.checkout.avrora-mode-pickup #customer_details .woocommerce-shipping-fields {
	display: none !important;
}

form.checkout.avrora-mode-pickup #customer_details .col-1 {
	width: 100% !important;
	float: none !important;
	max-width: 100% !important;
}

@media (min-width: 769px) {
	form.checkout.avrora-mode-pickup #customer_details .col2-set {
		display: block;
	}
}
