/* Cookie Consent Manager: front end styles. Colours are set from the admin panel. */

#ccm-banner,
#ccm-modal,
#ccm-revisit,
#ccm-overlay {
	box-sizing: border-box;
	font-family: inherit;
	line-height: 1.5;
}

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

#ccm-banner[hidden],
#ccm-modal[hidden],
#ccm-overlay[hidden],
#ccm-revisit[hidden] {
	display: none !important;
}

html.ccm-noscroll,
html.ccm-noscroll body {
	overflow: hidden;
}

/* Banner */

#ccm-banner {
	position: fixed;
	z-index: 999998;
	background: #fff;
	color: #1f2937;
	font-size: 14px;
	box-shadow: 0 6px 32px rgba(0, 0, 0, 0.18);
}

.ccm-style-bar-bottom,
.ccm-style-bar-top {
	left: 0;
	right: 0;
}

.ccm-style-bar-bottom { bottom: 0; }
.ccm-style-bar-top { top: 0; }

.ccm-style-bar-bottom .ccm-banner-inner,
.ccm-style-bar-top .ccm-banner-inner {
	max-width: 1240px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 28px;
}

.ccm-style-bar-bottom .ccm-banner-content,
.ccm-style-bar-top .ccm-banner-content {
	flex: 1 1 auto;
}

.ccm-style-box-left,
.ccm-style-box-right {
	bottom: 20px;
	width: 420px;
	max-width: calc(100% - 40px);
	border-radius: 10px;
}

.ccm-style-box-left { left: 20px; }
.ccm-style-box-right { right: 20px; }

.ccm-style-popup-center {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 540px;
	max-width: calc(100% - 32px);
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 10px;
}

.ccm-style-box-left .ccm-banner-inner,
.ccm-style-box-right .ccm-banner-inner,
.ccm-style-popup-center .ccm-banner-inner {
	padding: 22px;
}

.ccm-style-box-left .ccm-actions,
.ccm-style-box-right .ccm-actions,
.ccm-style-popup-center .ccm-actions {
	margin-top: 16px;
}

.ccm-style-box-left .ccm-actions .ccm-btn,
.ccm-style-box-right .ccm-actions .ccm-btn,
.ccm-style-popup-center .ccm-actions .ccm-btn {
	flex: 1 1 auto;
}

.ccm-title,
.ccm-modal-title {
	margin: 0 0 6px;
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}

.ccm-message p,
.ccm-modal-intro p {
	margin: 0 0 8px;
}

.ccm-message p:last-child,
.ccm-modal-intro p:last-child {
	margin-bottom: 0;
}

.ccm-policy-link {
	text-decoration: underline;
	font-weight: 600;
}

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

/* Buttons */

.ccm-btn {
	appearance: none;
	-webkit-appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 10px 18px;
	margin: 0;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	text-transform: none;
	letter-spacing: normal;
	border: 2px solid transparent;
	border-radius: 6px;
	box-shadow: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.ccm-btn:hover { opacity: 0.88; }
.ccm-btn:active { transform: translateY(1px); }

.ccm-btn:focus-visible,
.ccm-close:focus-visible,
#ccm-revisit:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 2px;
}

.ccm-btn-primary { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.ccm-btn-secondary { background: transparent; color: inherit; border-color: currentColor; }

/* Overlay + modal */

.ccm-overlay {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999997;
	background: rgba(0, 0, 0, 0.5);
}

#ccm-modal {
	position: fixed;
	z-index: 999999;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 660px;
	max-width: calc(100% - 32px);
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1f2937;
	font-size: 14px;
	border-radius: 10px;
	box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
}

.ccm-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 22px;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ccm-modal-header .ccm-modal-title { margin: 0; }

.ccm-close {
	background: none;
	border: 0;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	padding: 2px 8px;
	cursor: pointer;
	border-radius: 4px;
}

.ccm-modal-body {
	padding: 18px 22px;
	overflow-y: auto;
}

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

/* Categories */

.ccm-category {
	margin-top: 12px;
	padding: 14px 16px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 6px;
}

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

.ccm-category-title { font-weight: 700; }

.ccm-category-desc {
	margin: 8px 0 0;
	font-size: 0.95em;
	opacity: 0.85;
}

.ccm-always {
	font-size: 0.85em;
	font-weight: 700;
	white-space: nowrap;
	opacity: 0.8;
}

.ccm-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
	margin: 0;
}

.ccm-switch input {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}

.ccm-slider {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: #cbd5e1;
	border-radius: 24px;
	transition: background 0.2s ease;
}

.ccm-slider:before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
	transition: transform 0.2s ease;
}

.ccm-switch input:checked + .ccm-slider { background: #1d4ed8; }
.ccm-switch input:checked + .ccm-slider:before { transform: translateX(20px); }

.ccm-switch input:focus-visible + .ccm-slider {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

/* Cookie tables */

.ccm-cookies { margin-top: 10px; }

.ccm-cookies summary {
	cursor: pointer;
	font-size: 0.9em;
	font-weight: 600;
}

.ccm-cookie-table {
	width: 100%;
	margin-top: 8px;
	border-collapse: collapse;
	font-size: 0.85em;
}

.ccm-cookie-table th,
.ccm-cookie-table td {
	padding: 6px 8px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.ccm-cookie-table code {
	font-size: 0.95em;
	word-break: break-all;
}

/* Revisit button */

#ccm-revisit {
	position: fixed;
	bottom: 20px;
	z-index: 999996;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 0;
	border-radius: 30px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	background: #1d4ed8;
	color: #fff;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ccm-revisit-left { left: 20px; }
.ccm-revisit-right { right: 20px; }

/* Blocked iframes */

iframe[data-ccm-blocked] { display: none !important; }

.ccm-iframe-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 200px;
	padding: 24px;
	background: #f3f4f6;
	color: #374151;
	text-align: center;
	font-size: 14px;
	border-radius: 6px;
}

.ccm-iframe-placeholder p { margin: 0; }

/* Cookie list shortcode */

.ccm-cookie-list-category { margin-bottom: 28px; }

/* Mobile */

@media (max-width: 782px) {
	.ccm-style-bar-bottom .ccm-banner-inner,
	.ccm-style-bar-top .ccm-banner-inner {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
		padding: 16px;
	}

	.ccm-actions .ccm-btn { flex: 1 1 auto; }

	.ccm-style-box-left,
	.ccm-style-box-right {
		left: 10px;
		right: 10px;
		bottom: 10px;
		width: auto;
		max-width: none;
	}

	.ccm-modal-footer .ccm-btn { flex: 1 1 100%; }

	#ccm-revisit span { display: none; }
	#ccm-revisit { padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.ccm-btn,
	.ccm-slider,
	.ccm-slider:before { transition: none; }
}
