/*
 * WP Cookie Consent — banner, preference center and floating button.
 *
 * No build step: this file is enqueued as-is via wp_enqueue_style(). Colors
 * come from CSS custom properties set inline on #wcc-consent-root by
 * BannerRenderer (--wcc-primary / --wcc-bg / --wcc-text), so an admin's
 * choices in the "Banner" settings screen apply without regenerating this
 * file.
 */

#wcc-consent-root {
	--wcc-radius: 10px;
	--wcc-gap: 12px;
	font-size: 15px;
	line-height: 1.5;
}

#wcc-consent-root,
#wcc-consent-root *,
#wcc-consent-root *::before,
#wcc-consent-root *::after {
	box-sizing: border-box;
}

.wcc-hidden {
	display: none !important;
}

/* ---------------------------------------------------------------------- */
/* Banner                                                                  */
/* ---------------------------------------------------------------------- */

.wcc-banner {
	position: fixed;
	z-index: 999999;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--wcc-gap);
	padding: 16px 20px;
	background: var(--wcc-bg, #1d2327);
	color: var(--wcc-text, #fff);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.25);
}

.wcc-position-bottom_bar .wcc-banner {
	left: 0;
	right: 0;
	bottom: 0;
}

.wcc-position-top_bar .wcc-banner {
	left: 0;
	right: 0;
	top: 0;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

.wcc-position-center_modal .wcc-banner {
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	max-width: 560px;
	width: calc(100% - 32px);
	border-radius: var(--wcc-radius);
}

.wcc-layout-box .wcc-banner {
	left: auto;
	right: 16px;
	bottom: 16px;
	top: auto;
	transform: none;
	max-width: 380px;
	width: calc(100% - 32px);
	border-radius: var(--wcc-radius);
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.wcc-banner__body {
	flex: 1 1 320px;
}

.wcc-banner__title {
	margin: 0 0 6px;
	font-size: 1.05em;
	font-weight: 600;
	color: inherit;
}

.wcc-banner__description {
	margin: 0;
	color: inherit;
	opacity: 0.9;
}

.wcc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	flex: 0 0 auto;
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.wcc-btn {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 0.95em;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.wcc-btn--primary {
	background: var(--wcc-primary, #2271b1);
	border-color: var(--wcc-primary, #2271b1);
	color: #fff;
}

.wcc-btn--secondary {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

.wcc-btn--ghost {
	background: transparent;
	border-color: transparent;
	color: inherit;
	text-decoration: underline;
}

.wcc-review-consent-link {
	appearance: none;
	background: transparent;
	border: none;
	padding: 0;
	color: var(--wcc-primary, #2271b1);
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

#wcc-consent-root :is(.wcc-btn, .wcc-review-consent-link, input, a, button):focus-visible {
	outline: 2px solid var(--wcc-primary, #2271b1);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* Floating "review consent" button                                       */
/* ---------------------------------------------------------------------- */

.wcc-floating-button {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: none;
	background: var(--wcc-primary, #2271b1);
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* ---------------------------------------------------------------------- */
/* Preference center (modal dialog)                                       */
/* ---------------------------------------------------------------------- */

.wcc-preferences {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wcc-preferences[hidden] {
	display: none;
}

.wcc-preferences__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.wcc-preferences__panel {
	position: relative;
	z-index: 1;
	background: #fff;
	color: #1d2327;
	border-radius: var(--wcc-radius);
	max-width: 640px;
	width: 100%;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.wcc-preferences__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #e2e4e7;
}

.wcc-preferences__header h2 {
	margin: 0;
	font-size: 1.1em;
}

.wcc-preferences__close {
	appearance: none;
	background: transparent;
	border: none;
	font-size: 1.4em;
	line-height: 1;
	cursor: pointer;
	color: inherit;
}

.wcc-preferences__error {
	margin: 0;
	padding: 10px 20px;
	background: #fceaea;
	color: #8a1f11;
	border-bottom: 1px solid #e2e4e7;
}

.wcc-preferences__body {
	padding: 16px 20px;
	overflow-y: auto;
}

.wcc-category + .wcc-category {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #e2e4e7;
}

.wcc-category__header {
	display: flex;
	align-items: center;
}

.wcc-category__description {
	margin: 6px 0 0;
	opacity: 0.85;
	font-size: 0.92em;
}

.wcc-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-weight: 600;
}

.wcc-toggle input[type="checkbox"] {
	width: 18px;
	height: 18px;
}

.wcc-toggle__badge {
	font-weight: 400;
	font-size: 0.8em;
	opacity: 0.7;
}

.wcc-services {
	list-style: none;
	margin: 10px 0 0;
	padding: 0 0 0 26px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.wcc-toggle--service {
	font-weight: 400;
	font-size: 0.92em;
}

.wcc-preferences__footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 20px;
	border-top: 1px solid #e2e4e7;
}

@media (max-width: 480px) {
	.wcc-banner {
		flex-direction: column;
		align-items: stretch;
	}

	.wcc-banner__actions {
		justify-content: stretch;
	}

	.wcc-banner__actions .wcc-btn {
		flex: 1 1 auto;
	}
}
