/*
 * Simple Cookie Consent — frontend styles.
 * No external fonts, no frameworks, no icon libraries.
 * Colours, radii, width and animation speed are all driven by
 * CSS custom properties printed inline by the plugin (see
 * includes/class-scc-frontend.php), so this file never needs editing.
 */

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

/* Semi-transparent backdrop, only actually shown for the "center" position. */
.scc-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 20, 14, 30, 0.45 );
	z-index: 999998;
	opacity: 0;
	transition: opacity var( --scc-anim-speed, 300ms ) ease;
}

.scc-overlay.scc-visible {
	opacity: 1;
}

.scc-banner {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	max-width: var( --scc-window-width, 420px );
	width: calc( 100% - 32px );
	background: var( --scc-window-bg, #fffaf3 );
	color: var( --scc-text, #3a2f4d );
	border-radius: var( --scc-window-radius, 18px );
	box-shadow: 0 12px 36px rgba( 40, 20, 60, 0.18 ), 0 2px 8px rgba( 40, 20, 60, 0.08 );
	font-size: 15px;
	line-height: 1.5;
	opacity: 0;
	transition:
		opacity var( --scc-anim-speed, 300ms ) ease,
		transform var( --scc-anim-speed, 300ms ) ease;
}

.scc-banner * {
	box-sizing: border-box;
}

.scc-banner.scc-visible {
	opacity: 1;
}

/* Disable all motion when the admin turns animation off. */
.scc-no-animate,
.scc-no-animate * {
	transition: none !important;
}

/* --- Position: bottom (default) --- */
.scc-pos-bottom {
	left: 16px;
	bottom: 16px;
	transform: translateY( 24px ) scale( 0.98 );
}

.scc-pos-bottom.scc-visible {
	transform: translateY( 0 ) scale( 1 );
}

/* --- Position: top --- */
.scc-pos-top {
	left: 16px;
	top: 16px;
	transform: translateY( -24px ) scale( 0.98 );
}

.scc-pos-top.scc-visible {
	transform: translateY( 0 ) scale( 1 );
}

/* --- Position: center --- */
.scc-pos-center {
	left: 50%;
	top: 50%;
	transform: translate( -50%, -50% ) scale( 0.96 );
}

.scc-pos-center.scc-visible {
	transform: translate( -50%, -50% ) scale( 1 );
}

.scc-banner__inner {
	padding: 22px 24px;
}

.scc-banner__title {
	margin: 0 0 8px;
	font-size: 17px;
	font-weight: 700;
	color: inherit;
}

.scc-banner__message {
	margin: 0 0 12px;
	color: inherit;
	opacity: 0.9;
}

.scc-banner__more {
	margin: 0 0 16px;
	font-size: 13px;
	opacity: 0.85;
}

.scc-banner__more-label {
	margin-right: 4px;
}

.scc-link {
	color: var( --scc-link, #8a63d2 );
	text-decoration: underline;
	text-underline-offset: 2px;
}

.scc-link:hover,
.scc-link:focus-visible {
	opacity: 0.75;
}

.scc-banner__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.scc-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: var( --scc-btn-radius, 999px );
	transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.scc-btn:hover {
	transform: translateY( -1px );
}

.scc-btn:active {
	transform: translateY( 0 );
}

.scc-btn:focus-visible {
	outline: 2px solid var( --scc-btn-bg, #8a63d2 );
	outline-offset: 2px;
}

.scc-btn--primary {
	background: var( --scc-btn-bg, #8a63d2 );
	color: var( --scc-btn-text, #ffffff );
	box-shadow: 0 6px 16px rgba( 138, 99, 210, 0.35 );
}

.scc-btn--primary:hover {
	box-shadow: 0 8px 20px rgba( 138, 99, 210, 0.45 );
}

.scc-btn--secondary {
	background: var( --scc-btn2-bg, #f1edfb );
	color: var( --scc-btn2-text, #4a3f6b );
}

.scc-btn--ghost {
	background: transparent;
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
	padding-left: 6px;
	padding-right: 6px;
	box-shadow: none;
}

.scc-banner__details {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

.scc-banner__links {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 13px;
}

/* --- Responsive tweaks for phones --- */
@media ( max-width: 480px ) {
	.scc-pos-bottom,
	.scc-pos-top {
		left: 8px;
		right: 8px;
		width: auto;
		max-width: none;
	}

	.scc-pos-center {
		width: calc( 100% - 24px );
	}

	.scc-banner__inner {
		padding: 18px 16px;
	}

	.scc-banner__actions {
		flex-direction: column;
	}

	.scc-btn {
		width: 100%;
		text-align: center;
	}
}

/* Respect users who have asked the OS for reduced motion. */
@media ( prefers-reduced-motion: reduce ) {
	.scc-banner,
	.scc-overlay {
		transition: none !important;
	}
}
