/* =========================================================
   Simple Cookie Consent — front-end styles
   Colors are pulled from CSS custom properties set inline by
   includes/class-sccm-banner.php (enqueue_assets) so that admin
   color changes apply instantly without regenerating this file.
   ========================================================= */

#sccm-banner,
#sccm-modal-overlay,
#sccm-floating-icon {
	box-sizing: border-box;
}
#sccm-banner *,
#sccm-modal-overlay *,
#sccm-floating-icon * {
	box-sizing: border-box;
}

/* ---------- Banner ---------- */
.sccm-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: var( --sccm-bg, #1a1a2e );
	color: var( --sccm-text, #ffffff );
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 0 24px rgba( 0, 0, 0, 0.25 );
}
.sccm-banner[hidden] {
	display: none;
}
.sccm-pos-bottom { bottom: 0; }
.sccm-pos-top { top: 0; }

.sccm-layout-bar .sccm-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: 1300px;
	margin: 0 auto;
	padding: 18px 24px;
}
.sccm-layout-box {
	left: 24px;
	right: auto;
	bottom: 24px;
	max-width: 380px;
	border-radius: 12px;
}
.sccm-layout-box.sccm-pos-top {
	top: 24px;
	bottom: auto;
}
.sccm-layout-box .sccm-banner-inner {
	display: block;
	padding: 20px;
}
.sccm-layout-box .sccm-banner-actions {
	margin-top: 14px;
	flex-direction: column;
	align-items: stretch;
}

.sccm-banner-text {
	flex: 1 1 420px;
	min-width: 220px;
}
.sccm-banner-title {
	display: block;
	margin-bottom: 4px;
	font-size: 16px;
}
.sccm-banner-text p {
	margin: 0;
}
.sccm-policy-link {
	color: var( --sccm-link, #8d2092 );
	text-decoration: underline;
	margin-left: 4px;
	white-space: nowrap;
}

.sccm-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex-shrink: 0;
}

/* ---------- Buttons (shared) ---------- */
/* Padding, margin, font-size, font-family, and border-width are set as
   inline style="" attributes in PHP (class-sccm-banner.php) so they
   cannot be overridden by any theme stylesheet rule. Only structural and
   interaction properties live here. */
.sccm-btn {
	cursor: pointer;
	border-style: solid; /* color + width come from inline style */
	border-radius: 6px;
	font-weight: 600;
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.1s ease;
	display: inline-block;
}
.sccm-btn:hover {
	opacity: 0.88;
}
.sccm-btn:active {
	transform: scale( 0.98 );
}

.sccm-btn-accept {
	background: var( --sccm-accept-bg, #8d2092 );
	color: var( --sccm-accept-text, #ffffff );
}
.sccm-btn-reject {
	background: var( --sccm-reject-bg, transparent );
	color: var( --sccm-reject-text, #ffffff );
	border-color: var( --sccm-reject-border, #ffffff );
}
.sccm-btn-settings {
	background: var( --sccm-settings-bg, transparent );
	color: var( --sccm-settings-text, #ffffff );
	border-color: var( --sccm-settings-border, #ffffff );
}

/* ---------- Modal ---------- */
.sccm-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	background: rgba( 0, 0, 0, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.sccm-modal-overlay[hidden] {
	display: none;
}

.sccm-modal {
	background: var( --sccm-modal-bg, #ffffff );
	color: var( --sccm-modal-text, #1a1a2e );
	width: 100%;
	max-width: 560px;
	max-height: 86vh;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 12px 48px rgba( 0, 0, 0, 0.3 );
}

.sccm-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 22px;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}
.sccm-modal-header h2 {
	margin: 0;
	font-size: 18px;
}
.sccm-modal-close {
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 4px 8px;
}

.sccm-modal-body {
	padding: 10px 22px;
	overflow-y: auto;
}

.sccm-category-row {
	padding: 14px 0;
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}
.sccm-category-row:last-child {
	border-bottom: none;
}
.sccm-category-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.sccm-category-name {
	font-weight: 600;
	font-size: 15px;
}
.sccm-category-desc {
	margin: 6px 0 0;
	font-size: 13px;
	opacity: 0.8;
}

.sccm-modal-footer {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	padding: 16px 22px;
	border-top: 1px solid rgba( 0, 0, 0, 0.08 );
}

/* ---------- Toggle switch ---------- */
.sccm-toggle {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
}
.sccm-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}
.sccm-toggle-slider {
	position: absolute;
	inset: 0;
	background: var( --sccm-toggle-off, #cccccc );
	border-radius: 999px;
	transition: background 0.15s ease;
	cursor: pointer;
}
.sccm-toggle-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.15s ease;
}
.sccm-toggle input:checked + .sccm-toggle-slider {
	background: var( --sccm-toggle-on, #8d2092 );
}
.sccm-toggle input:checked + .sccm-toggle-slider::before {
	transform: translateX( 18px );
}
.sccm-toggle input:disabled + .sccm-toggle-slider {
	cursor: not-allowed;
	opacity: 0.7;
}

/* ---------- Floating "reopen" icon ---------- */
.sccm-floating-icon {
	position: fixed;
	bottom: 20px;
	z-index: 999998;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var( --sccm-accept-bg, #8d2092 );
	color: var( --sccm-accept-text, #ffffff );
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.25 );
}
.sccm-floating-icon[hidden] {
	display: none;
}
.sccm-icon-bottom-left { left: 20px; }
.sccm-icon-bottom-right { right: 20px; }

/* ---------- Reopen shortcode button ---------- */
.sccm-reopen-btn {
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	color: var( --sccm-link, #8d2092 );
	text-decoration: underline;
	font: inherit;
}

@media ( max-width: 600px ) {
	.sccm-layout-bar .sccm-banner-actions {
		width: 100%;
	}
	.sccm-layout-bar .sccm-btn {
		flex: 1 1 auto;
	}
	.sccm-layout-box {
		left: 12px;
		right: 12px;
		max-width: none;
	}
}
