/**
 * Willbe Cookie Consent — front-end styles.
 * Colour values are driven by CSS variables set inline from plugin settings.
 *
 * @package WillbeCookieConsent
 */

#wlbcc-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

/* ---------- banner ---------- */

.wlbcc-banner {
	position: fixed;
	z-index: 99999;
	background: var(--wlbcc-bg, #fff);
	color: var(--wlbcc-text, #2c2c2c);
	box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.18 );
	border-radius: 10px;
	max-width: 440px;
	width: calc( 100% - 40px );
	animation: wlbcc-in 0.25s ease;
}

@keyframes wlbcc-in {
	from { opacity: 0; transform: translateY( 12px ); }
	to   { opacity: 1; transform: translateY( 0 ); }
}

.wlbcc-pos-bottom-left  { bottom: 20px; left: 20px; }
.wlbcc-pos-bottom-right { bottom: 20px; right: 20px; }
.wlbcc-pos-bottom { bottom: 20px; left: 50%; transform: translateX( -50% ); }
.wlbcc-pos-top    { top: 20px; left: 50%; transform: translateX( -50% ); }

/* Bar layout spans the viewport width. */
.wlbcc-layout-bar {
	max-width: none;
	width: 100%;
	left: 0;
	right: 0;
	border-radius: 0;
}
.wlbcc-layout-bar.wlbcc-pos-bottom,
.wlbcc-layout-bar.wlbcc-pos-bottom-left,
.wlbcc-layout-bar.wlbcc-pos-bottom-right { bottom: 0; left: 0; transform: none; }
.wlbcc-layout-bar.wlbcc-pos-top { top: 0; left: 0; transform: none; }
.wlbcc-layout-bar .wlbcc-banner__body { max-width: 1200px; margin: 0 auto; }
.wlbcc-layout-bar .wlbcc-banner__actions { justify-content: flex-end; }

.wlbcc-banner__body { padding: 20px 22px; }
.wlbcc-banner__title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.wlbcc-banner__msg { font-size: 13.5px; line-height: 1.55; }
.wlbcc-banner__policy { color: var(--wlbcc-accent, #1a73e8); }

.wlbcc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

/* ---------- buttons ---------- */

.wlbcc-btn {
	cursor: pointer;
	border: 0;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}
.wlbcc-btn--accept   { background: var(--wlbcc-accept-bg, #1a73e8); color: var(--wlbcc-accept-text, #fff); }
.wlbcc-btn--reject   { background: var(--wlbcc-reject-bg, #eef1f5); color: var(--wlbcc-reject-text, #2c2c2c); }
.wlbcc-btn--settings {
	background: transparent;
	color: var(--wlbcc-accent, #1a73e8);
	text-decoration: underline;
	padding-left: 6px;
	padding-right: 6px;
}
.wlbcc-btn:focus-visible { outline: 2px solid var(--wlbcc-accent, #1a73e8); outline-offset: 2px; }

/* ---------- modal ---------- */

.wlbcc-modal__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba( 0, 0, 0, 0.5 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.wlbcc-modal {
	background: var(--wlbcc-bg, #fff);
	color: var(--wlbcc-text, #2c2c2c);
	border-radius: 10px;
	width: 100%;
	max-width: 540px;
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}
.wlbcc-modal__head {
	padding: 16px 20px;
	font-size: 16px;
	font-weight: 700;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}
.wlbcc-modal__body { padding: 8px 20px; overflow-y: auto; }
.wlbcc-modal__foot {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	padding: 14px 20px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

.wlbcc-cat { padding: 14px 0; border-bottom: 1px solid rgba( 0, 0, 0, 0.06 ); }
.wlbcc-cat:last-child { border-bottom: 0; }
.wlbcc-cat__head { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.wlbcc-cat__desc { font-size: 12.5px; line-height: 1.5; margin-top: 6px; opacity: 0.85; }

/* ---------- revisit ---------- */

.wlbcc-revisit {
	position: fixed;
	bottom: 18px;
	left: 18px;
	z-index: 99998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	cursor: pointer;
	background: var(--wlbcc-accent, #1a73e8);
	color: #fff;
	font-size: 20px;
	box-shadow: 0 3px 12px rgba( 0, 0, 0, 0.25 );
}

@media ( max-width: 600px ) {
	.wlbcc-banner { left: 10px; right: 10px; width: auto; max-width: none; }
	.wlbcc-pos-bottom, .wlbcc-pos-top { transform: none; }
	.wlbcc-banner__actions .wlbcc-btn { flex: 1 1 auto; }
}
