/* Cookie Consent Manager - front-end banner styles */

:root {
	--ccm-accent: #0056b3;
}

.ccm-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.45 );
	z-index: 999998;
}

.ccm-banner {
	position: fixed;
	z-index: 999999;
	background: #ffffff;
	color: #23262d;
	font-size: 14px;
	line-height: 1.55;
	box-shadow: 0 -2px 24px rgba( 0, 0, 0, 0.18 );
	opacity: 0;
	transform: translateY( 20px );
	transition: opacity .3s ease, transform .3s ease;
	max-height: 90vh;
	overflow-y: auto;
}

.ccm-banner.ccm-visible {
	opacity: 1;
	transform: translateY( 0 );
}

.ccm-banner.ccm-pos-bottom {
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	border-top: 1px solid #e2e5ea;
}

.ccm-banner.ccm-pos-top {
	left: 0;
	right: 0;
	top: 0;
	width: 100%;
	border-bottom: 1px solid #e2e5ea;
	transform: translateY( -20px );
}
.ccm-banner.ccm-pos-top.ccm-visible { transform: translateY( 0 ); }

.ccm-banner.ccm-pos-box-bottom-left,
.ccm-banner.ccm-pos-box-bottom-right {
	bottom: 20px;
	max-width: 420px;
	width: calc( 100% - 40px );
	border-radius: 10px;
	border: 1px solid #e2e5ea;
}
.ccm-banner.ccm-pos-box-bottom-left { left: 20px; }
.ccm-banner.ccm-pos-box-bottom-right { right: 20px; }

.ccm-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	padding: 30px 0px;
	max-width: 85vw;
	margin: 0 auto;
}

.ccm-banner-text {
	flex: 1 1 480px;
	min-width: 240px;
}

.ccm-banner-title {
	margin: 0 0 15px;
	font-size: 16px;
	font-weight: 700;
	color: #14161a;
}

.ccm-banner-desc {
	margin: 0;
	color: #4a4f57;
}

.ccm-banner-desc p { margin: 0 0 6px; }

.ccm-banner-links {
	margin-top: 8px;
	display: flex;
	gap: 16px;
}
.ccm-banner-links a {
	color: var( --ccm-accent );
	text-decoration: underline;
	font-size: 13px;
}

.ccm-banner-actions {
	flex-direction: column;
    display: flex;
    gap: 10px;
    width: 230px;
}

.ccm-btn {
	font-size: 14px;
	font-weight: 600;
	padding: 11px 22px;
	border-radius: 4px;
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	transition: filter .15s ease, background-color .15s ease;
}
.ccm-btn:hover { filter: brightness( 0.94 ); }

.ccm-btn-primary {
	background: var( --ccm-accent );
	color: #fff;
}

.ccm-btn-outline {
	background: #fff;
	color: #23262d;
	border-color: #c9ccd2;
}

.ccm-btn-link {
	background: transparent;
	color: var( --ccm-accent );
	text-decoration: underline;
	padding: 11px 6px;
}

.ccm-details {
	border-top: 1px solid #e9ebee;
	padding: 6px 32px 26px;
	max-width: 1400px;
	margin: 0 auto;
}

.ccm-details h3 {
	font-size: 15px;
	margin: 14px 0 10px;
}

.ccm-cat-row {
	padding: 12px 0;
	border-bottom: 1px solid #f0f1f3;
}
.ccm-cat-row:last-of-type { border-bottom: none; }

.ccm-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.ccm-cat-label {
	font-weight: 600;
	font-size: 15px;
}

.ccm-cat-desc {
	margin: 6px 0 0;
	color: #6b7078;
	font-size: 13px;
}

.ccm-details-actions {
	margin-top: 18px;
	justify-content: flex-end;
	width: 100%;
}

/* Toggle switch */
.ccm-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex: 0 0 auto;
}
.ccm-switch input { opacity: 0; width: 0; height: 0; }
.ccm-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background-color: #ccced3;
	border-radius: 22px;
	transition: background-color .2s ease;
}
.ccm-slider::before {
	content: "";
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	top: 3px;
	background-color: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
}
.ccm-switch input:checked + .ccm-slider { background-color: var( --ccm-accent ); }
.ccm-switch input:checked + .ccm-slider::before { transform: translateX( 18px ); }
.ccm-switch-disabled { opacity: .6; cursor: not-allowed; }

/* Blocked embed placeholder (Maps / YouTube / OSM) */
.ccm-embed-wrap {
	position: relative;
}
.ccm-embed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	text-align: center;
	min-height: 200px;
	background: #f4f5f7;
	border: 1px dashed #c9ccd2;
	border-radius: 6px;
	padding: 24px;
	color: #4a4f57;
	font-size: 14px;
	position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.ccm-embed-wrap iframe[data-cookie-activated] ~ .ccm-embed-placeholder,
.ccm-embed-wrap iframe[src="about:blank"] {
	/* hidden visually until size is restored on activation; kept simple on purpose */
}

.ccm-manage-link {
	background: none;
	border: none;
	padding: 0;
	color: var( --ccm-accent );
	text-decoration: underline;
	cursor: pointer;
	font: inherit;
}

/* RTL support (Arabic, Hebrew, etc via WPML) */
html[dir="rtl"] .ccm-banner-actions { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .ccm-slider::before { left: auto; right: 3px; }
html[dir="rtl"] .ccm-switch input:checked + .ccm-slider::before { transform: translateX( -18px ); }

.ccm-banner-switches {
	padding-top: 20px;
    display: flex;
    align-items: center;
    grid-column-gap: 30px;
    grid-row-gap: 10px;
    flex-wrap: wrap;
}

.ccm-cat-banner-row {
	display: flex;
    align-items: center;
    gap: 8px;
}

.ccm-banner-logo {
	padding-right: 10px;
}

.ccm-banner-inner .ccm-banner-logo img {
	max-width: 150px;
    max-height: 60px;
    width: auto;
    height: auto;
}

#ccm-btn-details {
	padding-left: 0 !important;
}

#ccm-show-banner {
	position: fixed;
    bottom: 0;
    right: 20px;
    z-index: 10000;
    background-color: var(--ccm-accent);
    color: #FFF;
    padding: 5px 10px 2px;
    border-radius: 4px 4px 0 0;
    font-size: 1rem;
    font-weight: 300;
    line-height: 100%;
    transition: .3s ease;
    opacity: 0;
    visibility: hidden;
	pointer-events: none;
}

#ccm-show-banner.ccm-show-banner-visible {
	opacity: 1;
    visibility: visible;
	pointer-events: initial;
}

#ccm-show-banner.ccm-show-banner-visible:hover {
	cursor: pointer;
}

@media (max-width: 1400px) {
	.ccm-banner-inner {
		max-width: 93vw;
	}
	.ccm-banner-actions {
		width: 200px;
	}
}

@media (max-width: 900px) {
	.ccm-banner-actions {
		width: 100%;
	}
}

@media ( max-width: 680px ) {
	.ccm-banner-inner { padding: 18px; }
	.ccm-banner-actions { width: 100%; justify-content: stretch; }
	.ccm-btn { flex: 1 1 auto; text-align: center; }
	.ccm-details { padding: 6px 18px 20px; }
}

@media (max-width: 450px) {
	.ccm-banner-switches {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
	.ccm-banner-logo {
		display: none;
	}
}

@media (max-width: 400px) {
	.ccm-banner-switches {
		grid-template-columns: minmax(0, 1fr);
		gap: 12px;
	}
	.ccm-cat-banner-row {
		display: grid;
    	grid-template-columns: 200px minmax(0, 1fr);
	}
}