/* W2S Services — Cookie Consent Banner */

#w2s-cookie-banner {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	line-height: 1.5;
}

/* Positions */
#w2s-cookie-banner.w2s-cookie-banner--bottom,
#w2s-cookie-banner.w2s-cookie-banner--top {
	left: 0;
	right: 0;
	width: 100%;
}

#w2s-cookie-banner.w2s-cookie-banner--bottom {
	bottom: 0;
}

#w2s-cookie-banner.w2s-cookie-banner--top {
	top: 0;
}

#w2s-cookie-banner.w2s-cookie-banner--bottom-left {
	bottom: 20px;
	left: 20px;
	max-width: 380px;
	border-radius: 8px;
}

#w2s-cookie-banner.w2s-cookie-banner--bottom-right {
	bottom: 20px;
	right: 20px;
	max-width: 380px;
	border-radius: 8px;
}

/* Inner layout */
.w2s-cookie-banner__inner {
	padding: 16px 20px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.w2s-cookie-banner--bottom .w2s-cookie-banner__inner,
.w2s-cookie-banner--top .w2s-cookie-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.w2s-cookie-banner__text {
	flex: 1 1 300px;
	margin: 0;
}

/* ── Button actions row ──────────────────────────────────────────────────── */

.w2s-cookie-button__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

/*
 * Accept and Reject buttons intentionally share identical sizing and padding.
 * GDPR/ePrivacy require the Reject option to be equally easy to exercise —
 * no dark patterns (smaller text, lighter colour, hidden behind extra clicks).
 * Colour is controlled via inline style from PHP (same value for both).
 */
.w2s-cookie-button__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.5em 1.25em;
	min-width: 110px;
	border: none;
	border-radius: 3px;
	font-size: 0.9em;
	font-family: inherit;
	font-weight: 600;
	line-height: 1.4;
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
	transition: opacity 0.15s;
}

.w2s-cookie-button__btn:hover,
.w2s-cookie-button__btn:focus {
	opacity: 0.85;
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Customize button has no background by default — it acts as a tertiary action. */
.w2s-cookie-button__btn--customize {
	background: transparent !important;
	color: inherit;
	text-decoration: underline;
	font-weight: 400;
	min-width: auto;
	padding-left: 0.5em;
	padding-right: 0.5em;
}

/* ── Category list (Customize panel) ────────────────────────────────────── */

.w2s-cookie-categories__list {
	width: 100%;
	display: flex;
	flex-wrap: wrap;
	gap: 10px 20px;
	padding: 10px 0;
}

.w2s-cookie-categories__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
	font-size: 0.9em;
}

.w2s-cookie-categories__item input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
	flex-shrink: 0;
}

.w2s-cookie-categories__item input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

/* Hidden utility */
[hidden] {
	display: none !important;
}

/* Responsive */
@media ( max-width: 600px ) {
	/* Prevent the banner from growing taller than 70% of the viewport. */
	#w2s-cookie-banner {
		max-height: 70vh;
		overflow-y: auto;
	}

	.w2s-cookie-banner__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Stop the text from stretching to fill remaining column space. */
	.w2s-cookie-banner__text {
		flex: 0 0 auto;
	}

	#w2s-cookie-banner.w2s-cookie-banner--bottom-left,
	#w2s-cookie-banner.w2s-cookie-banner--bottom-right {
		left: 10px;
		right: 10px;
		max-width: none;
		border-radius: 8px;
	}
}
