/*
 * Cookie consent starter kit — base styles.
 * Layout only. Colours read GeneratePress global colour variables where they
 * exist (--base-3, --contrast, --accent) and fall back otherwise — adjust the
 * custom properties below to match the site.
 */

.ccb-banner,
.ccb-panel,
.ccb-embed,
.ccb-table,
.ccb-float {
	--ccb-bg: var(--base-3, #ffffff);
	--ccb-text: var(--contrast, #1a1a1a);
	--ccb-muted: var(--contrast-2, #555555);
	--ccb-accent: var(--accent, #1e4f8c);
	--ccb-accent-text: var(--base-3, #ffffff);
	--ccb-border: var(--base, #d9d9d9);
	--ccb-radius: 6px;
	--ccb-gap: 16px;
}

.ccb-banner--locked .ccb-policy-link:focus {
	outline: none;
}

/* Banner ---------------------------------------------------------------- */

/* The banner is a <dialog>: reset the browser's dialog box styles. */
.ccb-banner {
	position: fixed;
	inset: auto 0 0 0;
	width: auto;
	max-width: none;
	max-height: none;
	margin: 0;
	border: 0;
	z-index: 9999;
	padding: var(--ccb-gap);
	background: var(--ccb-bg);
	color: var(--ccb-text);
	border-top: 1px solid var(--ccb-border);
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}

/* Require a choice: modal backdrop and page scroll lock. */
.ccb-banner::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

html.ccb-locked,
html.ccb-locked body {
	overflow: hidden;
}

html.ccb-locked {
	scrollbar-gutter: stable;
}

/* Locked: the bar becomes a centred pop-up, text above the buttons. */
.ccb-banner.ccb-banner--locked {
	box-sizing: border-box;
	inset: 0;
	width: min(640px, calc(100% - 32px));
	height: fit-content;
	max-height: calc(100vh - 32px);
	margin: auto;
	padding: 24px;
	overflow-y: auto;
	border: 0;
	border-radius: var(--ccb-radius);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.ccb-banner--locked .ccb-banner__content {
	flex-basis: 100%;
}

.ccb-banner__inner {
	display: flex;
	flex-wrap: wrap;
	gap: var(--ccb-gap);
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
}

.ccb-banner__content {
	flex: 1 1 480px;
}

.ccb-banner__title,
.ccb-panel__title {
	margin: 0 0 8px;
	font-weight: 600;
	font-size: 1.125rem;
}

.ccb-banner__body p {
	margin: 0 0 8px;
}

.ccb-policy-link {
	color: inherit;
	text-decoration: underline;
}

/* Buttons --------------------------------------------------------------- */

.ccb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ccb-btn {
	padding: 10px 18px;
	border: 1px solid var(--ccb-accent);
	border-radius: var(--ccb-radius);
	font: inherit;
	line-height: 1.2;
	cursor: pointer;
}

/* Accept all and Reject all share one style: equal prominence. */
.ccb-btn--choice {
	background: var(--ccb-accent);
	color: var(--ccb-accent-text);
}

.ccb-btn--secondary {
	background: transparent;
	color: var(--ccb-accent);
}

.ccb-btn:focus-visible,
.ccb-panel__close:focus-visible,
.ccb-category__toggle:focus-visible {
	outline: 2px solid var(--ccb-accent);
	outline-offset: 2px;
}

/* Preferences dialog ---------------------------------------------------- */

.ccb-panel {
	width: min(640px, calc(100% - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: var(--ccb-radius);
	background: var(--ccb-bg);
	color: var(--ccb-text);
}

.ccb-panel::backdrop {
	background: rgba(0, 0, 0, 0.5);
}

.ccb-panel__inner {
	padding: 24px;
}

.ccb-panel__header {
	display: flex;
	gap: var(--ccb-gap);
	align-items: flex-start;
	justify-content: space-between;
}

.ccb-panel__close {
	padding: 0 4px;
	border: 0;
	background: transparent;
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
}

.ccb-panel__intro,
.ccb-panel__transfer {
	margin: 0 0 12px;
}

.ccb-panel__transfer {
	color: var(--ccb-muted);
	font-size: 0.9375rem;
}

.ccb-categories {
	margin: 16px 0;
	padding: 0;
	list-style: none;
}

.ccb-category {
	margin: 0;
	padding: 12px 0;
	border-top: 1px solid var(--ccb-border);
}

.ccb-category__head {
	display: flex;
	gap: 10px;
	align-items: center;
}

.ccb-category__toggle {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--ccb-accent);
}

.ccb-category__label {
	font-weight: 600;
}

.ccb-category__always {
	margin-left: auto;
	color: var(--ccb-muted);
	font-size: 0.875rem;
}

.ccb-category__desc {
	padding-left: 30px;
	font-size: 0.9375rem;
}

.ccb-category__desc p {
	margin: 6px 0 0;
}

.ccb-category__services {
	color: var(--ccb-muted);
}

.ccb-category__services-label {
	font-weight: 600;
	margin-right: 4px;
}

/* Embed placeholder ----------------------------------------------------- */

.ccb-embed {
	padding: 24px;
	border: 1px solid var(--ccb-border);
	border-radius: var(--ccb-radius);
	background: var(--ccb-bg);
	color: var(--ccb-text);
	text-align: center;
}

.ccb-embed__message {
	margin: 0 0 12px;
}

/* Cookie table shortcode ------------------------------------------------ */

.ccb-table {
	margin-bottom: 32px;
}

.ccb-table__scroll {
	overflow-x: auto;
}

.ccb-table table {
	width: 100%;
	border-collapse: collapse;
}

.ccb-table th,
.ccb-table td {
	padding: 8px 10px;
	border: 1px solid var(--ccb-border);
	text-align: left;
	vertical-align: top;
}

/* Floating "Cookie settings" button ------------------------------------- */

.ccb-float {
	position: fixed;
	bottom: 16px;
	z-index: 9998;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ccb-accent);
	color: var(--ccb-accent-text);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.ccb-float[hidden] {
	display: none;
}

.ccb-float--bottom-right {
	right: 16px;
}

.ccb-float--bottom-left {
	left: 16px;
}

.ccb-float:focus-visible {
	outline: 2px solid var(--ccb-accent);
	outline-offset: 3px;
}
