/* ==========================================================================
   Castle Connections Travel - Cookie Consent (GDPR / ePrivacy)
   Pairs with js/cookie-consent.js
   ========================================================================== */

#cct-cc-banner,
#cct-cc-modal {
	--cc-accent: #0b6b58;      /* 6.5:1 on white (WCAG AA), matches site link colour */
	--cc-accent-dark: #084a3d;
	--cc-brand: #1ABC9C;       /* decorative only */
	--cc-text: #444;
	--cc-muted: #777;
	--cc-bg: #fff;
	--cc-border: #e5e5e5;
	font-family: 'Lato', sans-serif;
	color: var(--cc-text);
	box-sizing: border-box;
}
#cct-cc-banner *,
#cct-cc-modal * { box-sizing: border-box; }

/* ---------- Bottom banner ---------- */
#cct-cc-banner {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	z-index: 10000;
	background: var(--cc-bg);
	border-top: 4px solid var(--cc-brand);
	box-shadow: 0 -4px 24px rgba(0,0,0,.15);
	padding: 20px 16px;
	animation: cct-cc-up .35s ease-out;
}
#cct-cc-banner[hidden] { display: none; }
#cct-cc-banner .cct-cc-inner {
	max-width: 1140px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 16px 32px;
}
#cct-cc-banner .cct-cc-text { flex: 1 1 480px; font-size: 15px; line-height: 1.55; }
#cct-cc-banner .cct-cc-text h2 {
	font-family: 'Raleway', sans-serif;
	font-weight: 600;
	font-size: 17px;
	margin: 0 0 6px;
	color: #333;
}
#cct-cc-banner .cct-cc-text p { margin: 0; }
#cct-cc-banner a,
#cct-cc-modal a { color: var(--cc-accent-dark); text-decoration: underline; }

.cct-cc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

/* Accept and Reject are deliberately equal in size and prominence,
   as EU regulators require rejecting to be as easy as accepting. */
.cct-cc-btn {
	font-family: 'Raleway', sans-serif;
	font-weight: 600;
	font-size: 14px;
	letter-spacing: .5px;
	text-transform: uppercase;
	min-width: 140px;
	padding: 11px 20px;
	border-radius: 3px;
	border: 2px solid var(--cc-accent);
	background: var(--cc-accent);
	color: #fff;
	cursor: pointer;
	line-height: 1.2;
	transition: background .2s, border-color .2s;
}
.cct-cc-btn:hover { background: var(--cc-accent-dark); border-color: var(--cc-accent-dark); }
.cct-cc-btn-link {
	background: transparent;
	border-color: transparent;
	color: var(--cc-accent-dark);
	min-width: 0;
	text-decoration: underline;
	text-transform: none;
	letter-spacing: 0;
	font-size: 15px;
}
.cct-cc-btn-link:hover { background: transparent; border-color: transparent; color: #08463a; }
.cct-cc-btn:focus-visible,
.cct-cc-switch input:focus-visible + span,
.cct-cc-close:focus-visible { outline: 3px solid #f0ad4e; outline-offset: 2px; }

/* ---------- Preferences dialog ---------- */
#cct-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	background: rgba(0,0,0,.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
#cct-cc-modal[hidden] { display: none; }
#cct-cc-modal .cct-cc-dialog {
	background: var(--cc-bg);
	width: 100%;
	max-width: 620px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: 4px;
	border-top: 4px solid var(--cc-brand);
	box-shadow: 0 10px 40px rgba(0,0,0,.3);
	padding: 28px 28px 22px;
	position: relative;
}
#cct-cc-modal h2 {
	font-family: 'Raleway', sans-serif;
	font-weight: 600;
	font-size: 22px;
	margin: 0 0 10px;
	color: #333;
	padding-right: 32px;
}
#cct-cc-modal .cct-cc-intro { font-size: 15px; line-height: 1.55; margin: 0 0 18px; }
.cct-cc-close {
	position: absolute;
	top: 14px; right: 16px;
	background: none;
	border: 0;
	font-size: 28px;
	line-height: 1;
	color: var(--cc-muted);
	cursor: pointer;
	padding: 4px 8px;
}
.cct-cc-cat {
	border: 1px solid var(--cc-border);
	border-radius: 4px;
	padding: 14px 16px;
	margin-bottom: 12px;
}
.cct-cc-cat-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.cct-cc-cat-head strong { font-size: 16px; color: #333; }
.cct-cc-cat p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--cc-muted); }
.cct-cc-always { font-size: 13px; font-weight: 700; color: var(--cc-accent-dark); white-space: nowrap; }

/* Toggle switch */
.cct-cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; }
.cct-cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.cct-cc-switch span {
	position: absolute; inset: 0;
	background: #ccc;
	border-radius: 26px;
	transition: background .2s;
}
.cct-cc-switch span::before {
	content: "";
	position: absolute;
	width: 20px; height: 20px;
	left: 3px; top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.cct-cc-switch input:checked + span { background: var(--cc-accent); }
.cct-cc-switch input:checked + span::before { transform: translateX(20px); }

#cct-cc-modal .cct-cc-actions { justify-content: flex-end; margin-top: 18px; }

/* Footer "Cookie Settings" link */
.cct-cc-settings-link { cursor: pointer; }

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

@media (max-width: 600px) {
	#cct-cc-banner { padding: 16px; }
	#cct-cc-banner .cct-cc-text { font-size: 14px; }
	.cct-cc-actions { width: 100%; }
	.cct-cc-actions .cct-cc-btn { flex: 1 1 auto; min-width: 0; }
	.cct-cc-actions .cct-cc-btn-link { flex: 1 0 100%; text-align: center; }
	#cct-cc-modal .cct-cc-dialog { padding: 22px 18px 18px; }
}

@media (prefers-reduced-motion: reduce) {
	#cct-cc-banner { animation: none; }
	.cct-cc-switch span, .cct-cc-switch span::before { transition: none; }
}
