/* Sunday Cookie Consent - front-end styles. Colors/radius/shadow come from
   CSS variables set inline by class-scc-frontend.php (print_inline_styles). */

#scc-banner,
#scc-modal,
#scc-overlay {
	box-sizing: border-box;
}

#scc-banner *,
#scc-modal * {
	box-sizing: border-box;
}

#scc-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
	z-index: 2147483001;
}

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

.scc-banner {
	position: fixed;
	z-index: 2147483002;
	background: var( --scc-bg, #fff );
	color: var( --scc-text, #1f2328 );
	border-radius: var( --scc-radius, 10px );
	box-shadow: var( --scc-shadow, 0 6px 24px rgba( 0, 0, 0, 0.18 ) );
	padding: 20px 24px;
	max-width: 100%;
	font-size: 14px;
	line-height: 1.55;
}

.scc-banner.scc-position-bottom {
	left: 0;
	right: 0;
	bottom: 0;
	border-radius: 0;
}

.scc-banner.scc-position-top {
	left: 0;
	right: 0;
	top: 0;
	border-radius: 0;
}

.scc-banner.scc-position-bottom-left {
	left: 20px;
	bottom: 20px;
	max-width: 420px;
}

.scc-banner.scc-position-bottom-right {
	right: 20px;
	bottom: 20px;
	max-width: 420px;
}

.scc-banner.scc-position-center {
	left: 50%;
	top: 50%;
	transform: translate( -50%, -50% );
	max-width: 480px;
	width: calc( 100% - 40px );
}

.scc-banner__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px;
	max-width: 1200px;
	margin: 0 auto;
}

.scc-banner.scc-position-bottom-left .scc-banner__inner,
.scc-banner.scc-position-bottom-right .scc-banner__inner,
.scc-banner.scc-position-center .scc-banner__inner {
	flex-direction: column;
	align-items: stretch;
}

.scc-banner__text {
	flex: 1 1 420px;
	min-width: 220px;
}

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

.scc-banner__desc {
	margin: 0;
	color: inherit;
}

.scc-banner__desc a {
	color: var( --scc-btn-primary-bg, #1a73e8 );
	text-decoration: underline;
	margin-left: 6px;
}

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

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

.scc-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: var( --scc-radius, 10px );
	line-height: 1.2;
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.05s ease;
}

.scc-btn:active {
	transform: scale( 0.98 );
}

.scc-btn:focus-visible {
	outline: 3px solid #4d90fe;
	outline-offset: 2px;
}

.scc-btn-primary {
	background: var( --scc-btn-primary-bg, #1a73e8 );
	color: var( --scc-btn-primary-text, #fff );
}

.scc-btn-secondary {
	background: var( --scc-btn-secondary-bg, #e8eaed );
	color: var( --scc-btn-secondary-text, #1f2328 );
}

.scc-btn-tertiary {
	background: transparent;
	color: inherit;
	text-decoration: underline;
	padding: 10px 8px;
}

.scc-btn:hover {
	opacity: 0.88;
}

/* ---------------------------------------------------------------------
   Modal
   ------------------------------------------------------------------- */

.scc-modal {
	position: fixed;
	z-index: 2147483003;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.scc-modal__panel {
	background: var( --scc-bg, #fff );
	color: var( --scc-text, #1f2328 );
	border-radius: var( --scc-radius, 10px );
	box-shadow: var( --scc-shadow, 0 6px 24px rgba( 0, 0, 0, 0.18 ) );
	max-width: 560px;
	width: 100%;
	max-height: calc( 100vh - 40px );
	overflow-y: auto;
	font-size: 14px;
	line-height: 1.55;
}

.scc-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}

.scc-modal__header h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: inherit;
}

.scc-modal__close {
	background: transparent;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 4px 8px;
	border-radius: 6px;
}

.scc-modal__close:focus-visible {
	outline: 3px solid #4d90fe;
	outline-offset: 2px;
}

.scc-modal__body {
	padding: 8px 20px;
}

.scc-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 20px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

.scc-category {
	padding: 14px 0;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.06 );
}

.scc-category:last-child {
	border-bottom: none;
}

.scc-category__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.scc-category__label {
	font-weight: 600;
	color: inherit;
}

.scc-locked {
	font-size: 12px;
	opacity: 0.7;
}

.scc-category__desc {
	margin: 6px 0 0;
	color: inherit;
	opacity: 0.85;
	font-size: 13px;
}

/* Toggle-switch look for real checkbox inputs (kept as real <input> for a11y/forms). */
.scc-category__row input[type="checkbox"] {
	appearance: none;
	width: 42px;
	height: 24px;
	border-radius: 999px;
	background: var( --scc-btn-secondary-bg, #e8eaed );
	position: relative;
	cursor: pointer;
	flex-shrink: 0;
	transition: background 0.15s ease;
}

.scc-category__row input[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.15s ease;
	box-shadow: 0 1px 2px rgba( 0, 0, 0, 0.3 );
}

.scc-category__row input[type="checkbox"]:checked {
	background: var( --scc-btn-primary-bg, #1a73e8 );
}

.scc-category__row input[type="checkbox"]:checked::before {
	transform: translateX( 18px );
}

.scc-category__row input[type="checkbox"]:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.scc-category__row input[type="checkbox"]:focus-visible {
	outline: 3px solid #4d90fe;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   Settings shortcode trigger
   ------------------------------------------------------------------- */

.scc-settings-trigger {
	appearance: none;
	background: transparent;
	border: 1px solid currentColor;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 13px;
	cursor: pointer;
}

/* ---------------------------------------------------------------------
   Animations
   ------------------------------------------------------------------- */

.scc-anim-slide.scc-position-bottom {
	animation: scc-slide-up 0.35s ease-out;
}

.scc-anim-slide.scc-position-top {
	animation: scc-slide-down 0.35s ease-out;
}

.scc-anim-slide.scc-position-bottom-left,
.scc-anim-slide.scc-position-bottom-right,
.scc-anim-slide.scc-position-center {
	animation: scc-fade-in 0.35s ease-out;
}

.scc-anim-fade {
	animation: scc-fade-in 0.35s ease-out;
}

@keyframes scc-slide-up {
	from {
		transform: translateY( 100% );
	}
	to {
		transform: translateY( 0 );
	}
}

@keyframes scc-slide-down {
	from {
		transform: translateY( -100% );
	}
	to {
		transform: translateY( 0 );
	}
}

@keyframes scc-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.scc-banner,
	.scc-modal {
		animation: none !important;
	}
}

/* ---------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */

@media ( max-width: 640px ) {
	.scc-banner {
		padding: 16px;
	}

	.scc-banner.scc-position-bottom-left,
	.scc-banner.scc-position-bottom-right {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
	}

	.scc-banner__actions {
		width: 100%;
	}

	.scc-banner__actions .scc-btn {
		flex: 1 1 auto;
		text-align: center;
	}

	.scc-modal__panel {
		max-width: 100%;
	}
}
