/* ==========================================================================
   My Cookie Consent — Frontend Banner
   Modern, clean design. Colors are driven entirely by CSS custom
   properties set from data-* attributes in consent-banner.js, so the
   admin's color choices apply without any inline styles in PHP.
   ========================================================================== */

:root {
	--mcc-primary: #2874fc;
	--mcc-secondary: #060606;
	--mcc-text: #1a1f36;
	--mcc-radius: 12px;
	--mcc-radius-btn: 10px;
	--mcc-shadow: 0 12px 40px rgba(16, 24, 40, 0.16);
	--mcc-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mcc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 20, 35, 0.45);
	z-index: 999998;
	animation: mccFadeIn 0.25s ease-out;
}

@keyframes mccFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes mccSlideUp {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@keyframes mccSlideDown {
	from { transform: translateY(-24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.mcc-banner {
	font-family: var(--mcc-font);
	position: fixed;
	z-index: 999999;
	background: #2c2c2c !important;
	color: var(--mcc-text);
	box-shadow: var(--mcc-shadow);
	animation: mccSlideUp 0.35s ease-out;
	box-sizing: border-box;
}

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

/* ---- Layout: full-width bar ---- */
.mcc-banner.mcc-layout-bar {
	left: 0;
	right: 0;
	width: 100%;
	border-radius: 0;
}
.mcc-banner.mcc-layout-bar.mcc-position-bottom {
	bottom: 0;
	border-top: 1px solid rgba(16, 24, 40, 0.08);
}
.mcc-banner.mcc-layout-bar.mcc-position-top {
	top: 0;
	border-bottom: 1px solid rgba(16, 24, 40, 0.08);
	animation-name: mccSlideDown;
}

/* ---- Layout: floating box ---- */
.mcc-banner.mcc-layout-box {
	width: 100%;
	max-width: 420px;
	border-radius: var(--mcc-radius);
	margin: 20px;
}
.mcc-banner.mcc-layout-box.mcc-position-bottom,
.mcc-banner.mcc-layout-box.mcc-position-bottom-left {
	bottom: 0;
	left: 0;
}
.mcc-banner.mcc-layout-box.mcc-position-bottom-right {
	bottom: 0;
	right: 0;
}
.mcc-banner.mcc-layout-box.mcc-position-top {
	top: 0;
	left: 0;
	animation-name: mccSlideDown;
}

.mcc-banner-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 22px 32px;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.mcc-layout-box .mcc-banner-inner {
	flex-direction: column;
	align-items: stretch;
	padding: 24px;
}

.mcc-banner-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--mcc-primary) 12%, transparent);
	color: var(--mcc-primary);
}

.mcc-layout-box .mcc-banner-icon {
	display: none;
}

.mcc-banner-content {
	flex: 1 1 380px;
	min-width: 0;
}

.mcc-banner-heading {
	margin: 0 0 6px;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: -0.01em;
	color: var(--mcc-text);
}

.mcc-banner-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	color: var(--mcc-text);
	opacity: 0.85;
}

.mcc-learn-more,
.mcc-banner-text a {
	color: var(--mcc-primary);
	font-weight: 600;
	text-decoration: none;
	margin-left: 4px;
	opacity: 1;
}
.mcc-learn-more:hover,
.mcc-banner-text a:hover {
	text-decoration: underline;
}

.mcc-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	flex: 0 0 auto;
	margin-left: auto;
}

.mcc-layout-box .mcc-banner-actions {
	margin-left: 0;
	width: 100%;
}

/* ---- Buttons ---- */
.mcc-btn {
	appearance: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	font-weight: 600;
	font-size: clamp(13.5px, 1.5vw, 16px);
	line-height: 1;
	padding: 10px 25px;
	white-space: nowrap;
	transition: transform 0.15s ease, filter 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
	border-radius: var(--mcc-radius-btn);
}

.mcc-buttons-pill .mcc-btn { border-radius: 999px; }
.mcc-buttons-square .mcc-btn { border-radius: 4px; }

.mcc-btn-solid {
	background: var(--mcc-primary);
	color: #ffffff;
	box-shadow: 0 4px 14px color-mix(in srgb, var(--mcc-primary) 35%, transparent);
}
.mcc-btn-solid:hover { filter: brightness(0.92); transform: translateY(-1px); }
.mcc-btn-solid:active { transform: translateY(0); }

.mcc-btn-outline {
	background: transparent;
	color: var(--mcc-text);
	border: 1.5px solid color-mix(in srgb, var(--mcc-text) 25%, transparent);
}
.mcc-btn-outline:hover {
	background: color-mix(in srgb, var(--mcc-text) 6%, transparent);
}

.mcc-btn-ghost {
	background: transparent;
	color: var(--mcc-primary);
	padding: 11px 8px;
}
.mcc-btn-ghost:hover { text-decoration: underline; }

.mcc-layout-box .mcc-banner-actions .mcc-btn {
	flex: 1 1 auto;
	text-align: center;
}

/* ---- Settings / preferences panel ---- */
.mcc-settings-panel {
	font-family: var(--mcc-font);
	position: fixed;
	z-index: 1000000;
	inset: 0;
	background: rgba(15, 20, 35, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: mccFadeIn 0.2s ease-out;
}

.mcc-settings-inner {
	width: 100%;
	max-width: 460px;
	max-height: 90vh;
	overflow-y: auto;
	background: #ffffff;
	color: #1a1f36;
	border-radius: 16px;
	padding: 24px;
	box-shadow: 0 20px 60px rgba(16, 24, 40, 0.35);
}

.mcc-settings-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 8px;
}

.mcc-settings-header h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
}

.mcc-close-btn {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #6b7280;
	padding: 4px 8px;
}
.mcc-close-btn:hover { color: #1a1f36; }

.mcc-toggle-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid #eef0f4;
}
.mcc-toggle-row:last-of-type { border-bottom: none; }

.mcc-toggle-row span:first-child {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.mcc-toggle-row strong { font-size: 14px; }
.mcc-toggle-row small { font-size: 12.5px; color: #6b7280; line-height: 1.4; }

.mcc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: 0 0 auto;
}
.mcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.mcc-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #d5d9e0;
	border-radius: 999px;
	transition: 0.2s;
}
.mcc-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.mcc-switch input:checked + .mcc-slider {
	background-color: var(--mcc-primary);
}
.mcc-switch input:checked + .mcc-slider::before {
	transform: translateX(18px);
}
.mcc-switch-disabled .mcc-slider {
	background-color: var(--mcc-primary);
	opacity: 0.5;
	cursor: not-allowed;
}

.mcc-settings-footer {
	display: flex;
	gap: 10px;
	margin-top: 18px;
}
.mcc-settings-footer .mcc-btn {
	flex: 1 1 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
	.mcc-banner-inner {
		padding: 18px 20px;
	}
	.mcc-banner-actions {
		margin-left: 0;
		width: 100%;
	}
}

@media (max-width: 640px) {
	.mcc-banner.mcc-layout-box {
		max-width: none;
		margin: 12px;
		width: calc(100% - 24px);
	}
	.mcc-banner-inner {
		flex-direction: column;
		align-items: stretch;
		text-align: left;
	}
	.mcc-banner-icon {
		display: none;
	}
	.mcc-banner-actions {
		flex-direction: column;
	}
	.mcc-banner-actions .mcc-btn {
		width: 100%;
		text-align: center;
	}
	.mcc-settings-inner {
		padding: 20px;
		border-radius: 14px;
	}
}
