/* ==========================================================================
   Store Essentials — Nicotine Warning, Free Shipping Bar & Mobile Sticky ATC
   ========================================================================== */

/* 1. Site-wide Nicotine Warning & Locale/Currency Utility Bar */
.tvse-nicotine-bar {
	position: relative;
	z-index: 50;
	background: var(--wp--preset--color--dark-surface, #0B1120);
	color: #F8FAFC;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.75rem;
	line-height: 1.4;
}

.tvse-nicotine-bar__inner {
	max-width: 1280px;
	margin: 0 auto;
	padding: 0.45rem clamp(1rem, 3vw, 2rem);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1.25rem;
	flex-wrap: wrap;
}

.tvse-nicotine-bar__notice {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	min-width: 0;
	flex: 1 1 320px;
}

.tvse-nicotine-bar__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.1rem 0.45rem;
	border-radius: 4px;
	border: 1px solid rgba(248, 250, 252, 0.35);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	flex-shrink: 0;
}

.tvse-nicotine-bar__text {
	margin: 0;
	font-weight: 500;
	letter-spacing: 0.01em;
}

/* Language & Currency Switcher */
.tvse-switchers {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	flex-shrink: 0;
}

.tvse-switcher {
	position: relative;
}

.tvse-switcher__trigger {
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	padding: 0.25rem 0.6rem;
	border-radius: 6px;
	border: 1px solid rgba(248, 250, 252, 0.18);
	background: rgba(255, 255, 255, 0.06);
	color: #F8FAFC;
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	user-select: none;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.tvse-switcher__trigger::-webkit-details-marker {
	display: none;
}

.tvse-switcher__trigger:hover,
.tvse-switcher[open] .tvse-switcher__trigger {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(248, 250, 252, 0.35);
}

.tvse-switcher__caret {
	opacity: 0.75;
	transition: transform 150ms ease;
}

.tvse-switcher[open] .tvse-switcher__caret {
	transform: rotate(180deg);
}

.tvse-switcher__menu {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 164px;
	margin: 0;
	padding: 0.35rem;
	list-style: none;
	background: #FFFFFF;
	color: #0F172A;
	border: 1px solid #E2E8F0;
	border-radius: 10px;
	box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
	z-index: 90;
}

.tvse-switcher__option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.45rem 0.65rem;
	border-radius: 6px;
	color: #0F172A;
	font-size: 0.8125rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 140ms ease, color 140ms ease;
}

.tvse-switcher__option:hover {
	background: #F5F6F8;
	color: #0284C7;
}

.tvse-switcher__option.is-active {
	background: #E0F2FE;
	color: #0369A1;
	font-weight: 600;
}

.tvse-switcher__code {
	font-size: 0.75rem;
	color: #64748B;
	font-weight: 500;
}

.tvse-switcher__option.is-active .tvse-switcher__code {
	color: #0369A1;
}

@media (max-width: 782px) {
	.tvse-nicotine-bar__inner {
		justify-content: center;
		text-align: center;
	}

	.tvse-nicotine-bar__notice {
		justify-content: center;
		flex-basis: 100%;
	}
}

/* 2. Free Shipping Progress Bar (Mini-Cart & Cart) */
.tvse-shipping-bar {
	padding: 0.875rem 1rem;
	margin: 0.5rem 0 0.875rem;
	background: var(--wp--preset--color--surface, #F5F6F8);
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	border-radius: 10px;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--contrast, #0F172A);
}

.wp-block-woocommerce-mini-cart-contents .tvse-shipping-bar {
	margin: 0 1rem 0.75rem;
}

.tvse-shipping-bar__label {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
	font-weight: 500;
}

.tvse-shipping-bar__label strong {
	font-weight: 700;
	color: var(--wp--preset--color--accent-dark, #0369A1);
}

.tvse-shipping-bar.is-unlocked {
	background: #ECFDF5;
	border-color: #A7F3D0;
	color: #065F46;
}

.tvse-shipping-bar.is-unlocked .tvse-shipping-bar__label {
	font-weight: 600;
}

.tvse-shipping-bar__track {
	width: 100%;
	height: 6px;
	border-radius: 999px;
	background: var(--wp--preset--color--border, #E2E8F0);
	overflow: hidden;
}

.tvse-shipping-bar__fill {
	height: 100%;
	width: 0%;
	border-radius: 999px;
	background: var(--wp--preset--color--accent, #0284C7);
	transition: width 320ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 220ms ease;
}

.tvse-shipping-bar.is-unlocked .tvse-shipping-bar__fill {
	background: var(--wp--preset--color--success, #059669);
}

/* 3. Mobile Sticky Add-to-Cart Bar */
.tvse-sticky-atc {
	display: none;
}

@media (max-width: 782px) {
	.tvse-sticky-atc {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 60;
		background: color-mix(in srgb, var(--wp--preset--color--base, #FFFFFF) 94%, transparent);
		backdrop-filter: saturate(180%) blur(14px);
		-webkit-backdrop-filter: saturate(180%) blur(14px);
		border-top: 1px solid var(--wp--preset--color--border, #E2E8F0);
		box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
		transform: translateY(110%);
		transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}

	.tvse-sticky-atc.is-visible {
		transform: translateY(0);
	}

	.tvse-sticky-atc__inner {
		display: flex;
		align-items: center;
		gap: 0.75rem;
		padding: 0.625rem 1rem;
	}

	.tvse-sticky-atc__media {
		width: 44px;
		height: 44px;
		border-radius: 8px;
		overflow: hidden;
		background: var(--wp--preset--color--surface, #F5F6F8);
		border: 1px solid var(--wp--preset--color--border, #E2E8F0);
		flex-shrink: 0;
	}

	.tvse-sticky-atc__thumb {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}

	.tvse-sticky-atc__info {
		min-width: 0;
		flex: 1 1 auto;
	}

	.tvse-sticky-atc__title {
		font-size: 0.8125rem;
		font-weight: 600;
		color: var(--wp--preset--color--contrast, #0F172A);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.tvse-sticky-atc__price {
		font-size: 0.8125rem;
		font-weight: 700;
		color: var(--wp--preset--color--accent-dark, #0369A1);
		font-variant-numeric: tabular-nums;
	}

	.tvse-sticky-atc__price del {
		color: var(--wp--preset--color--muted, #5B6475);
		font-weight: 400;
		margin-right: 0.25rem;
	}

	.tvse-sticky-atc__price ins {
		text-decoration: none;
	}

	.tvse-sticky-atc__btn {
		flex-shrink: 0;
		min-height: 40px;
		padding: 0 1rem;
		border: none;
		border-radius: 8px;
		background: var(--wp--preset--color--contrast, #0F172A);
		color: var(--wp--preset--color--base, #FFFFFF);
		font-size: 0.8125rem;
		font-weight: 600;
		cursor: pointer;
	}

	.tvse-sticky-atc__btn:active {
		transform: scale(0.98);
	}

	body.single-product {
		padding-bottom: 72px;
	}
}

/* 4. Minimalist 4-Language Age Gate Modal */
html.tvse-age-gate-open {
	overflow: hidden !important;
}

.tvse-age-gate {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(11, 17, 32, 0.72);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	transition: opacity 200ms ease;
}

.tvse-age-gate.is-closing {
	opacity: 0;
	pointer-events: none;
}

.tvse-age-gate__card {
	width: 100%;
	max-width: 440px;
	background: var(--wp--preset--color--base, #FFFFFF);
	color: var(--wp--preset--color--contrast, #0F172A);
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	border-radius: 20px;
	padding: 1.75rem;
	box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
	text-align: center;
}

.tvse-age-gate__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--wp--preset--color--border, #E2E8F0);
}

.tvse-age-gate__brand {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 700;
	font-size: 1rem;
	letter-spacing: -0.025em;
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-age-gate__logo {
	width: 24px;
	height: 24px;
	display: block;
	border-radius: 6px;
	flex-shrink: 0;
}

.tvse-age-gate__langs {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.tvse-age-gate__lang {
	padding: 0.2rem 0.45rem;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--wp--preset--color--muted, #5B6475);
	text-decoration: none;
	transition: background-color 140ms ease, color 140ms ease;
}

.tvse-age-gate__lang:hover {
	background: var(--wp--preset--color--surface, #F5F6F8);
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-age-gate__lang.is-active {
	background: var(--wp--preset--color--accent-soft, #E0F2FE);
	color: var(--wp--preset--color--accent-dark, #0369A1);
}

.tvse-age-gate__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	height: 36px;
	padding: 0 0.875rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface, #F5F6F8);
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	color: var(--wp--preset--color--contrast, #0F172A);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.03em;
	margin-bottom: 1rem;
}

.tvse-age-gate__title {
	margin: 0 0 0.625rem;
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-age-gate__desc {
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: var(--wp--preset--color--muted, #5B6475);
}

.tvse-age-gate__actions {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.tvse-age-gate__btn {
	width: 100%;
	min-height: 46px;
	padding: 0.75rem 1.25rem;
	border-radius: 10px;
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tvse-age-gate__btn--confirm {
	border: none;
	background: var(--wp--preset--color--contrast, #0F172A);
	color: var(--wp--preset--color--base, #FFFFFF);
}

.tvse-age-gate__btn--confirm:hover {
	background: var(--wp--preset--color--accent, #0284C7);
}

.tvse-age-gate__btn--deny {
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	background: var(--wp--preset--color--base, #FFFFFF);
	color: var(--wp--preset--color--muted, #5B6475);
}

.tvse-age-gate__btn--deny:hover {
	border-color: var(--wp--preset--color--contrast, #0F172A);
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-age-gate__denied-msg {
	margin: 0.875rem 0 0;
	padding: 0.625rem 0.75rem;
	border-radius: 8px;
	background: #FEF2F2;
	color: #B91C1C;
	font-size: 0.8125rem;
	font-weight: 500;
}

.tvse-age-gate__legal {
	margin: 1.25rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid var(--wp--preset--color--border, #E2E8F0);
	font-size: 0.75rem;
	line-height: 1.5;
	color: var(--wp--preset--color--muted, #5B6475);
}

/* 5. Minimalist Variation Swatch Pills */
.tvse-swatch-select-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.tvse-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	width: 100%;
}

.tvse-swatch-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	min-height: 40px;
	padding: 0.45rem 0.9rem;
	border-radius: 10px;
	border: 1.5px solid var(--wp--preset--color--border, #E2E8F0);
	background: var(--wp--preset--color--base, #FFFFFF);
	color: var(--wp--preset--color--contrast, #0F172A);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.tvse-swatch-pill:hover:not(:disabled):not(.is-selected) {
	border-color: var(--wp--preset--color--contrast, #0F172A);
	background: var(--wp--preset--color--surface, #F5F6F8);
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-swatch-pill.is-selected,
.tvse-swatch-pill.is-selected:hover:not(:disabled) {
	border-color: var(--wp--preset--color--contrast, #0F172A);
	background: var(--wp--preset--color--contrast, #0F172A);
	color: var(--wp--preset--color--base, #FFFFFF);
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.tvse-swatch-pill:disabled {
	opacity: 0.38;
	cursor: not-allowed;
	text-decoration: line-through;
}

.tvse-swatch-dot {
	width: 13px;
	height: 13px;
	border-radius: 999px;
	border: 1px solid rgba(15, 23, 42, 0.22);
	flex-shrink: 0;
}

.tvse-swatch-pill.is-selected .tvse-swatch-dot {
	border-color: rgba(255, 255, 255, 0.55);
}

/* 6. Minimalist 4-Language Contact Form & Order Tracking Form */
.tvse-contact-wrap {
	max-width: 640px;
	margin-top: 1.75rem;
}

.tvse-contact-alert {
	padding: 0.875rem 1rem;
	border-radius: 10px;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 1.25rem;
}

.tvse-contact-alert--success {
	background: #ECFDF5;
	border: 1px solid #A7F3D0;
	color: #065F46;
}

.tvse-contact-alert--error {
	background: #FEF2F2;
	border: 1px solid #FECACA;
	color: #991B1B;
}

.tvse-contact-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	background: var(--wp--preset--color--surface, #F5F6F8);
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	border-radius: 16px;
	padding: 1.5rem;
}

.tvse-contact-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
}

@media (max-width: 640px) {
	.tvse-contact-grid {
		grid-template-columns: 1fr;
	}
}

.tvse-contact-field {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.tvse-contact-field label {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--wp--preset--color--contrast, #0F172A);
}

.tvse-contact-field input,
.tvse-contact-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 0.6875rem 0.875rem;
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	border-radius: 8px;
	background: var(--wp--preset--color--base, #FFFFFF);
	color: var(--wp--preset--color--contrast, #0F172A);
	font-family: inherit;
	font-size: 0.9375rem;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tvse-contact-field input:focus,
.tvse-contact-field textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--accent, #0284C7);
	box-shadow: 0 0 0 3px var(--wp--preset--color--accent-soft, #E0F2FE);
}

.tvse-contact-submit {
	align-self: flex-start;
	min-height: 44px;
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 8px;
	background: var(--wp--preset--color--contrast, #0F172A);
	color: var(--wp--preset--color--base, #FFFFFF);
	font-size: 0.9375rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.tvse-contact-submit:hover {
	background: var(--wp--preset--color--accent, #0284C7);
}

/* WooCommerce Track Order form polish */
.woocommerce-form-track-order {
	max-width: 640px;
	background: var(--wp--preset--color--surface, #F5F6F8);
	border: 1px solid var(--wp--preset--color--border, #E2E8F0);
	border-radius: 16px;
	padding: 1.5rem;
	margin-top: 1.25rem;
}
