/**
 * Flavors Announcement / Cookie Bar - base structural styles.
 *
 * Layout, fixed/sticky positioning, and the show/hide transition only. Every
 * themeable value (colors, backgrounds, typography, padding, radius, alignment)
 * is injected by Elementor through the widget's control `selectors`, so this
 * file carries NO per-instance styling. Custom properties supply sensible
 * fallbacks for the bits the controls drive (--flavor-ann-gap / -justify).
 */

.flavor-announcement {
	--flavor-ann-gap: 16px;
	--flavor-ann-justify: center;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	color: #fff;
	background: #1d2327;
}

.flavor-announcement *,
.flavor-announcement *::before,
.flavor-announcement *::after {
	box-sizing: border-box;
}

.flavor-ann-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var( --flavor-ann-justify );
	gap: var( --flavor-ann-gap );
	width: 100%;
}

/* Leave room for the close button when it is shown. */
.flavor-announcement.flavor-ann-mode-announcement .flavor-ann-inner {
	padding-right: 28px;
}

/* ------------------------------------------------------------------- icon */

.flavor-ann-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	line-height: 1;
	font-size: 18px;
}

.flavor-ann-icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

/* ---------------------------------------------------------------- message */

.flavor-ann-message {
	flex: 0 1 auto;
	margin: 0;
	line-height: 1.5;
}

.flavor-ann-message p {
	margin: 0;
}

.flavor-ann-message p + p {
	margin-top: 0.5em;
}

.flavor-ann-message a {
	text-decoration: underline;
}

/* ---------------------------------------------------------------- actions */

.flavor-ann-actions {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 10px;
}

.flavor-ann-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 8px 18px;
	font: inherit;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 6px;
	background: transparent;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.flavor-ann-btn-primary {
	color: #1d2327;
	background: #fff;
}

.flavor-ann-btn:hover,
.flavor-ann-btn:focus {
	transform: translateY( -1px );
}

.flavor-ann-btn:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* ------------------------------------------------------------------ close */

.flavor-ann-close {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY( -50% );
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 0;
	color: #fff;
	cursor: pointer;
	background: transparent;
	border: 0;
	border-radius: 50%;
	transition: color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
	opacity: 0.8;
}

.flavor-ann-close:hover,
.flavor-ann-close:focus {
	opacity: 1;
	background: rgba( 255, 255, 255, 0.12 );
}

.flavor-ann-close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.flavor-ann-close svg {
	width: 20px;
	height: 20px;
	display: block;
}

/* --------------------------------------------------------- fixed / sticky */

.flavor-ann-fixed-yes .flavor-announcement {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 9999;
}

.flavor-ann-pos-top.flavor-ann-fixed-yes .flavor-announcement {
	top: 0;
}

.flavor-ann-pos-bottom.flavor-ann-fixed-yes .flavor-announcement {
	bottom: 0;
}

/* ---------------------------------------------------------- show / hide FX */

/*
 * The bar is hidden until the JS confirms it should appear (avoids a flash of
 * an already-dismissed bar). The editor never adds .flavor-ann-hidden, and the
 * JS adds .flavor-ann-visible once it decides to show it.
 */
.flavor-announcement {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.flavor-announcement.flavor-ann-hidden {
	display: none !important;
}

.flavor-announcement.flavor-ann-leaving {
	opacity: 0;
	pointer-events: none;
}

.flavor-ann-pos-top .flavor-announcement.flavor-ann-leaving {
	transform: translateY( -100% );
}

.flavor-ann-pos-bottom .flavor-announcement.flavor-ann-leaving {
	transform: translateY( 100% );
}

@media ( prefers-reduced-motion: reduce ) {
	.flavor-announcement,
	.flavor-ann-btn,
	.flavor-ann-close {
		transition: none !important;
	}

	.flavor-announcement.flavor-ann-leaving {
		transform: none;
	}
}

/* ----------------------------------------------------------------- mobile */

@media ( max-width: 767px ) {
	.flavor-ann-inner {
		flex-direction: column;
		text-align: center;
	}

	.flavor-announcement.flavor-ann-mode-announcement .flavor-ann-inner {
		padding-right: 0;
	}
}
