/**
 * Cookie Consent Manager — frontend styles.
 * Colours are driven by CSS custom properties set inline from the plugin's
 * Appearance settings (see HCC_Frontend::enqueue_assets). Override any of
 * this in your theme's stylesheet if you need something more bespoke.
 */

:root {
	--hcc-accent: #1d4ed8;
	--hcc-text: #0f172a;
	--hcc-bg: #ffffff;
	--hcc-btn-text: #ffffff;
	--hcc-radius: 10px;
	--hcc-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
}

.hcc-banner,
.hcc-modal {
	box-sizing: border-box;
}
.hcc-banner *,
.hcc-modal * {
	box-sizing: border-box;
}

/* ── Banner ─────────────────────────────────────────────────────────────── */

.hcc-banner {
	position: fixed;
	left: 0;
	right: 0;
	z-index: 999999;
	background: var(--hcc-bg);
	color: var(--hcc-text);
	box-shadow: var(--hcc-shadow);
	font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.hcc-banner[hidden] {
	display: none;
}
.hcc-position-bottom {
	bottom: 0;
}
.hcc-position-top {
	top: 0;
}

.hcc-banner-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 18px 24px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.hcc-layout-box.hcc-position-bottom {
	bottom: 20px;
	left: 20px;
	right: auto;
	max-width: 420px;
	border-radius: var(--hcc-radius);
}
.hcc-layout-box .hcc-banner-inner {
	flex-direction: column;
	align-items: stretch;
	padding: 22px;
}

.hcc-banner-heading {
	margin: 0 0 4px;
	font-weight: 700;
	font-size: 16px;
}

.hcc-banner-text {
	margin: 0;
	max-width: 760px;
	color: var(--hcc-text);
	opacity: 0.85;
}

.hcc-banner-link {
	color: var(--hcc-accent);
	text-decoration: underline;
	white-space: nowrap;
}

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

/* ── Buttons ────────────────────────────────────────────────────────────── */

.hcc-btn {
	font: inherit;
	font-weight: 600;
	font-size: 14px;
	border-radius: 8px;
	padding: 10px 18px;
	cursor: pointer;
	border: 1.5px solid var(--hcc-accent);
	white-space: nowrap;
	transition: opacity 0.15s ease, transform 0.05s ease;
}
.hcc-btn:active {
	transform: translateY(1px);
}
.hcc-btn-solid {
	background: var(--hcc-accent);
	color: var(--hcc-btn-text);
}
.hcc-btn-outline {
	background: transparent;
	color: var(--hcc-accent);
}
.hcc-btn:hover {
	opacity: 0.85;
}

/* ── Modal ──────────────────────────────────────────────────────────────── */

.hcc-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.hcc-modal[hidden] {
	display: none;
}
.hcc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}
.hcc-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: 86vh;
	overflow-y: auto;
	background: var(--hcc-bg);
	color: var(--hcc-text);
	border-radius: var(--hcc-radius);
	box-shadow: var(--hcc-shadow);
	font: 15px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hcc-modal-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 22px 22px 0;
}
.hcc-modal-header h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
}
.hcc-modal-close {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: var(--hcc-text);
	opacity: 0.6;
	padding: 4px;
}
.hcc-modal-close:hover {
	opacity: 1;
}

.hcc-modal-body {
	padding: 12px 22px 6px;
}
.hcc-modal-intro {
	opacity: 0.8;
	margin: 0 0 18px;
	font-size: 14px;
}

.hcc-category {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid rgba(15, 23, 42, 0.08);
}
.hcc-category:first-of-type {
	border-top: none;
}
.hcc-category-copy {
	flex: 1;
}
.hcc-category-label {
	display: block;
	margin-bottom: 3px;
	font-size: 14px;
}
.hcc-category-desc {
	display: block;
	font-size: 13px;
	opacity: 0.72;
}

.hcc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex-shrink: 0;
	margin-top: 2px;
}
.hcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.hcc-switch-slider {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.25);
	border-radius: 999px;
	transition: background 0.15s ease;
}
.hcc-switch-slider::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.15s ease;
}
.hcc-switch input:checked + .hcc-switch-slider {
	background: var(--hcc-accent);
}
.hcc-switch input:checked + .hcc-switch-slider::before {
	transform: translateX(18px);
}
.hcc-switch input:disabled + .hcc-switch-slider {
	opacity: 0.55;
	cursor: not-allowed;
}

.hcc-modal-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
	padding: 18px 22px 22px;
}

/* ── Embed placeholders (YouTube / Vimeo / Maps) ───────────────────────── */

.hcc-embed-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-align: center;
	background: #eef1f6;
	color: var(--hcc-text);
	border: 1px dashed rgba(15, 23, 42, 0.25);
	border-radius: 8px;
	padding: 24px 16px;
	font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	min-height: 160px;
}
.hcc-embed-placeholder p {
	margin: 0;
	max-width: 380px;
	opacity: 0.75;
	font-size: 13px;
}
.hcc-embed-load-btn {
	font: inherit;
	font-weight: 600;
	background: var(--hcc-accent);
	color: var(--hcc-btn-text);
	border: none;
	border-radius: 8px;
	padding: 9px 16px;
	cursor: pointer;
}

/* ── Cookie policy page content (shortcodes) ───────────────────────────── */

.hcc-policy .hcc-btn {
	display: inline-block;
}

.hcc-cookie-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 28px;
	font-size: 14px;
}
.hcc-cookie-table th,
.hcc-cookie-table td {
	text-align: left;
	padding: 9px 12px;
	border: 1px solid rgba(15, 23, 42, 0.12);
	vertical-align: top;
}
.hcc-cookie-table thead th {
	background: rgba(15, 23, 42, 0.04);
	font-weight: 700;
}
.hcc-cookie-table code {
	font-size: 13px;
}
.hcc-policy-empty {
	opacity: 0.7;
	font-style: italic;
}

/* ── Small screens ──────────────────────────────────────────────────────── */

@media (max-width: 640px) {
	.hcc-banner-inner {
		flex-direction: column;
		align-items: stretch;
	}
	.hcc-banner-actions {
		flex-direction: column;
	}
	.hcc-banner-actions .hcc-btn {
		width: 100%;
	}
	.hcc-layout-box.hcc-position-bottom {
		left: 12px;
		right: 12px;
		bottom: 12px;
		max-width: none;
	}
}
