/**
 * Aviso de cookies — Esmeralda Paper
 */

body.ashe-woocommerce-child .ashe-wc-cookie {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10050;
	padding: 0.75rem 0.85rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
	pointer-events: none;
	opacity: 0;
	transform: translateY(12px);
	transition:
		opacity 0.28s var(--ashe-wc-ease, cubic-bezier(0.22, 1, 0.36, 1)),
		transform 0.28s var(--ashe-wc-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.ashe-woocommerce-child .ashe-wc-cookie.is-visible {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

body.ashe-woocommerce-child .ashe-wc-cookie[hidden] {
	display: none !important;
}

body.ashe-woocommerce-child .ashe-wc-cookie__panel {
	max-width: min(var(--ashe-wc-max, 1320px), calc(100vw - 1.5rem));
	margin: 0 auto;
	padding: 1rem 1.15rem 1.05rem;
	background: var(--ashe-wc-white, #fff);
	color: var(--ashe-wc-ink, #17191a);
	border: 1px solid var(--ashe-wc-line, #e5e1db);
	border-radius: var(--ashe-wc-radius-lg, 12px);
	box-shadow:
		0 4px 12px rgba(23, 25, 26, 0.06),
		0 20px 48px rgba(23, 25, 26, 0.12);
}

body.ashe-woocommerce-child .ashe-wc-cookie__main {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.9rem 1.25rem;
}

body.ashe-woocommerce-child .ashe-wc-cookie__text {
	flex: 1 1 16rem;
	min-width: 0;
}

body.ashe-woocommerce-child .ashe-wc-cookie__title {
	margin: 0 0 0.35rem;
	font-family: var(--ashe-wc-font-serif, Georgia, serif);
	font-size: 1.05rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	line-height: 1.25;
	color: var(--ashe-wc-ink, #17191a);
}

body.ashe-woocommerce-child .ashe-wc-cookie__desc {
	margin: 0;
	font-size: var(--ashe-wc-fs-small, 0.8rem);
	line-height: 1.55;
	color: var(--ashe-wc-muted, #6a6e6c);
}

body.ashe-woocommerce-child .ashe-wc-cookie__link {
	color: var(--ashe-wc-accent-deep, #2c3a34);
	text-decoration: underline;
	text-underline-offset: 2px;
	font-weight: 600;
}

body.ashe-woocommerce-child .ashe-wc-cookie__link:hover,
body.ashe-woocommerce-child .ashe-wc-cookie__link:focus-visible {
	color: var(--ashe-wc-accent, #455a51);
}

body.ashe-woocommerce-child .ashe-wc-cookie__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.45rem;
	flex: 0 1 auto;
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: var(--ashe-wc-radius-pill, 999px);
	padding: 0.55rem 1rem;
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	cursor: pointer;
	transition:
		background var(--ashe-wc-dur, 0.22s) var(--ashe-wc-ease, ease),
		color var(--ashe-wc-dur, 0.22s) var(--ashe-wc-ease, ease),
		border-color var(--ashe-wc-dur, 0.22s) var(--ashe-wc-ease, ease),
		box-shadow var(--ashe-wc-dur, 0.22s) var(--ashe-wc-ease, ease);
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn:focus-visible {
	outline: none;
	box-shadow: var(--ashe-wc-focus, 0 0 0 3px rgba(69, 90, 81, 0.2));
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--primary {
	background: var(--ashe-wc-accent, #455a51);
	color: #fff;
	border-color: var(--ashe-wc-accent, #455a51);
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--primary:hover {
	background: var(--ashe-wc-accent-deep, #2c3a34);
	border-color: var(--ashe-wc-accent-deep, #2c3a34);
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--secondary {
	background: var(--ashe-wc-moss-soft, #eef2ef);
	color: var(--ashe-wc-accent-deep, #2c3a34);
	border-color: transparent;
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--secondary:hover {
	background: var(--ashe-wc-accent-soft-2, rgba(69, 90, 81, 0.14));
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--ghost {
	background: transparent;
	color: var(--ashe-wc-muted, #6a6e6c);
	border-color: var(--ashe-wc-line, #e5e1db);
}

body.ashe-woocommerce-child .ashe-wc-cookie__btn--ghost:hover {
	color: var(--ashe-wc-ink, #17191a);
	border-color: #cfc9c0;
	background: rgba(247, 244, 239, 0.6);
}

/* Preferências */
body.ashe-woocommerce-child .ashe-wc-cookie__prefs {
	margin-top: 0.95rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--ashe-wc-line, #e5e1db);
}

body.ashe-woocommerce-child .ashe-wc-cookie__prefs[hidden] {
	display: none !important;
}

body.ashe-woocommerce-child .ashe-wc-cookie__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

body.ashe-woocommerce-child .ashe-wc-cookie__item {
	margin: 0;
	padding: 0.65rem 0.75rem;
	background: var(--ashe-wc-paper, #f7f4ef);
	border-radius: var(--ashe-wc-radius, 8px);
	border: 1px solid transparent;
}

body.ashe-woocommerce-child .ashe-wc-cookie__label {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	margin: 0;
}

body.ashe-woocommerce-child .ashe-wc-cookie__meta {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-width: 0;
}

body.ashe-woocommerce-child .ashe-wc-cookie__meta strong {
	font-size: 0.84rem;
	font-weight: 600;
	color: var(--ashe-wc-ink, #17191a);
}

body.ashe-woocommerce-child .ashe-wc-cookie__meta span {
	font-size: 0.76rem;
	line-height: 1.45;
	color: var(--ashe-wc-muted, #6a6e6c);
}

/* Toggle switch */
body.ashe-woocommerce-child .ashe-wc-cookie__switch {
	position: relative;
	flex: 0 0 auto;
	width: 2.5rem;
	height: 1.4rem;
	margin-top: 0.1rem;
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 2;
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch.is-locked input {
	cursor: not-allowed;
}

body.ashe-woocommerce-child .ashe-wc-cookie__slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #d5d0c8;
	transition: background 0.2s ease;
}

body.ashe-woocommerce-child .ashe-wc-cookie__slider::after {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: calc(1.4rem - 4px);
	height: calc(1.4rem - 4px);
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(23, 25, 26, 0.18);
	transition: transform 0.2s ease;
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch input:checked + .ashe-wc-cookie__slider {
	background: var(--ashe-wc-accent, #455a51);
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch input:checked + .ashe-wc-cookie__slider::after {
	transform: translateX(1.1rem);
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch input:focus-visible + .ashe-wc-cookie__slider {
	box-shadow: var(--ashe-wc-focus, 0 0 0 3px rgba(69, 90, 81, 0.2));
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch.is-locked .ashe-wc-cookie__slider {
	background: var(--ashe-wc-accent, #455a51);
	opacity: 0.72;
}

body.ashe-woocommerce-child .ashe-wc-cookie__switch.is-locked .ashe-wc-cookie__slider::after {
	transform: translateX(1.1rem);
}

body.ashe-woocommerce-child .ashe-wc-cookie__prefs-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.75rem;
}

/* Empurra FABs quando o banner está aberto */
html.ashe-wc-cookie-open body.ashe-woocommerce-child .ashe-wc-wa,
html.ashe-wc-cookie-open body.ashe-woocommerce-child .ashe-wc-scrolltop,
html.ashe-wc-cookie-open body.ashe-woocommerce-child .scrolltop {
	bottom: calc(var(--float-bottom, 1.05rem) + 7.5rem) !important;
	transition: bottom 0.28s var(--ashe-wc-ease, ease);
}

/* Mobile */
@media screen and (max-width: 640px) {
	body.ashe-woocommerce-child .ashe-wc-cookie {
		padding: 0.55rem 0.55rem calc(0.55rem + env(safe-area-inset-bottom, 0px));
	}

	body.ashe-woocommerce-child .ashe-wc-cookie__panel {
		padding: 0.9rem 0.95rem 0.95rem;
		border-radius: 14px 14px 10px 10px;
	}

	body.ashe-woocommerce-child .ashe-wc-cookie__actions {
		width: 100%;
		flex-direction: column-reverse;
		align-items: stretch;
	}

	body.ashe-woocommerce-child .ashe-wc-cookie__btn {
		width: 100%;
		justify-content: center;
		text-align: center;
		padding: 0.65rem 1rem;
	}

	html.ashe-wc-cookie-open body.ashe-woocommerce-child .ashe-wc-wa,
	html.ashe-wc-cookie-open body.ashe-woocommerce-child .ashe-wc-scrolltop,
	html.ashe-wc-cookie-open body.ashe-woocommerce-child .scrolltop {
		bottom: calc(var(--float-bottom, 1.05rem) + 14rem) !important;
	}
}

/* Dark mode */
body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__panel {
	background: #1a1d24;
	color: #e8e6e1;
	border-color: #2a2e38;
	box-shadow:
		0 4px 12px rgba(0, 0, 0, 0.25),
		0 20px 48px rgba(0, 0, 0, 0.35);
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__title {
	color: #f2efe8;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__desc {
	color: #a8a9ad;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__link {
	color: #cbb79c;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__btn--primary {
	background: #cbb79c;
	border-color: #cbb79c;
	color: #1a1d24;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__btn--primary:hover {
	background: #d9c9b0;
	border-color: #d9c9b0;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__btn--secondary {
	background: #252930;
	color: #e8e6e1;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__btn--ghost {
	color: #a8a9ad;
	border-color: #3a3f4a;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__btn--ghost:hover {
	color: #f2efe8;
	border-color: #555b68;
	background: #22262e;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__prefs {
	border-top-color: #2a2e38;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__item {
	background: #15181e;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__meta strong {
	color: #f2efe8;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__meta span {
	color: #a8a9ad;
}

body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__switch input:checked + .ashe-wc-cookie__slider,
body.ashe-woocommerce-child.ashe-dark-mode .ashe-wc-cookie__switch.is-locked .ashe-wc-cookie__slider {
	background: #cbb79c;
}

/* Print */
@media print {
	body.ashe-woocommerce-child .ashe-wc-cookie {
		display: none !important;
	}
}
