/**
 * Zuger Weine WooCommerce – Frontend Styles
 *
 * Styles for age verification field and cart info box.
 * Uses .zw-* prefix to avoid conflicts with Avada / WooCommerce styles.
 * Supports both classic and block-based cart/checkout.
 */

/* ── Cart Info Box (Classic Cart) ─────────────────────────────── */

.zw-cart-info-box {
	margin-bottom: 2em;
	padding: 1em 1.5em;
	border-left: 4px solid #e0a800;
	background: #fff8e1;
	color: #32b5e2 !important;
}

.zw-cart-info-box p,
.zw-cart-info-box span {
	color: #32b5e2 !important;
}

.zw-cart-info-box p:last-child {
	margin-bottom: 0;
}

.zw-cart-info-box::before {
	content: "⚠";
	margin-right: 0.5em;
	font-size: 1.1em;
	color: #32b5e2 !important;
}

/* ── Cart Info Box (Block Cart) ───────────────────────────────── */

.zw-cart-info-box.wc-block-components-notice-banner {
	margin-bottom: 1.5em;
	padding: 1em 1.5em;
	border-left: 4px solid #e0a800;
	background: #fff8e1;
	color: #32b5e2 !important;
}

.zw-cart-info-box.wc-block-components-notice-banner p,
.zw-cart-info-box.wc-block-components-notice-banner span,
.zw-cart-info-box.wc-block-components-notice-banner .wc-block-components-notice-banner__content {
	color: #32b5e2 !important;
}

.zw-cart-info-box.wc-block-components-notice-banner p:last-child {
	margin-bottom: 0;
}

.zw-cart-info-box.wc-block-components-notice-banner svg {
	fill: #32b5e2 !important;
	flex-shrink: 0;
}

/* ── Checkout Info Box (Classic Checkout) ──────────────────────── */

.zw-checkout-info-box {
	margin-bottom: 2em;
	padding: 1em 1.5em;
	border-left: 4px solid #e0a800;
	background: #fff8e1;
	color: #32b5e2 !important;
}

.zw-checkout-info-box p,
.zw-checkout-info-box span {
	color: #32b5e2 !important;
}

.zw-checkout-info-box p:last-child {
	margin-bottom: 0;
}

.zw-checkout-info-box::before {
	content: "⚠";
	margin-right: 0.5em;
	font-size: 1.1em;
	color: #32b5e2 !important;
}

/* ── Checkout Info Box (Block Checkout) ────────────────────────── */

.zw-checkout-info-box.wc-block-components-notice-banner {
	margin-bottom: 1.5em;
	padding: 1em 1.5em;
	border-left: 4px solid #e0a800;
	background: #fff8e1;
	color: #32b5e2 !important;
}

.zw-checkout-info-box.wc-block-components-notice-banner p,
.zw-checkout-info-box.wc-block-components-notice-banner span,
.zw-checkout-info-box.wc-block-components-notice-banner .wc-block-components-notice-banner__content {
	color: #32b5e2 !important;
}

.zw-checkout-info-box.wc-block-components-notice-banner p:last-child {
	margin-bottom: 0;
}

.zw-checkout-info-box.wc-block-components-notice-banner svg {
	fill: #32b5e2 !important;
	flex-shrink: 0;
}

/* ── DOB Field: Hidden when no wine in cart ─────────────────────── */

.zw-dob-hidden {
	display: none !important;
}

/* ── DOB Field: Block Checkout ─────────────────────────────────── */

/* Reorder: label above input (WC renders input first, label second). */
.wp-block-woocommerce-checkout-fields-block
	.wc-block-components-text-input:has(input.zw-dob-enhanced[type="date"]) {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5ddd3;
	border-radius: 4px;
	padding: 1em;
}

/* Label: static title above the field, no floating animation. */
.wp-block-woocommerce-checkout-fields-block
	.wc-block-components-text-input:has(input.zw-dob-enhanced[type="date"]) label {
	display: block;
	position: static;
	transform: none;
	clip: auto;
	height: auto;
	width: auto;
	margin: 0 0 0.6em 0;
	padding: 0;
	overflow: visible;
	white-space: normal;
	font-size: 1em;
	font-weight: 600;
	color: #111;
	pointer-events: auto;
	cursor: default;
	opacity: 1;
	transition: none;
	animation: none !important;
	order: -1;
}

/* Input: move after label via flex order. */
.wp-block-woocommerce-checkout-fields-block
	.wc-block-components-text-input:has(input.zw-dob-enhanced[type="date"]) input {
	order: 0;
}

/* The date input itself. */
.wp-block-woocommerce-checkout-fields-block
	.wc-block-components-text-input
	input.zw-dob-enhanced[type="date"] {
	max-width: 240px;
	width: 100%;
	padding: 0.6em 0.8em;
	border: 1px solid #ccc;
	border-radius: 3px;
	color: #000;
	background: #fff;
	font-size: 16px;
}

/* Placeholder text: full black. */
.wp-block-woocommerce-checkout-fields-block
	.wc-block-components-text-input
	input.zw-dob-enhanced[type="date"]::placeholder {
	color: #000;
	opacity: 1;
}

/* ── DOB Field: Classic Checkout ───────────────────────────────── */

.woocommerce-checkout .form-row:has(input.zw-dob-enhanced[type="date"]) label {
	display: block;
	margin-bottom: 0.5em;
	font-weight: 600;
	font-size: 1em;
	color: #111;
}

.woocommerce-checkout input.zw-dob-enhanced[type="date"] {
	max-width: 240px;
	width: 100%;
	padding: 0.6em 0.8em;
	color: #000;
	background: #fff;
	font-size: 16px;
}

/* ── DOB Field: Inline Feedback Message ───────────────────────── */

.zw-dob-feedback {
	display: block;
	margin-top: 0.35em;
	font-size: 0.85em;
	color: #c00;
	line-height: 1.3;
}

/* ── DOB Field: Valid / Invalid States (Block Checkout) ───────── */

.wc-block-components-text-input.zw-dob-valid input {
	border-color: #69bf4a;
}

.wc-block-components-text-input.zw-dob-invalid input {
	border-color: #c00;
}

/* ── DOB Field: Valid / Invalid States (Classic Checkout) ─────── */

.woocommerce-checkout .form-row.zw-dob-valid input {
	border-color: #69bf4a;
}

.woocommerce-checkout .form-row.zw-dob-invalid input {
	border-color: #c00;
}

/* ── Shipping: Replaced No-Shipping Message (Block Checkout) ─── */

.wc-block-components-shipping-rates-control__no-results-notice.zw-shipping-replaced {
	border-left: 4px solid #a67c52;
	background: #fdf8f3;
	padding: 1em 1.5em;
	font-size: 0.95em;
	line-height: 1.5;
}