/**
 * StudioSitu Consent — front-end styles.
 *
 * The banner itself is styled by vanilla-cookieconsent's stylesheet. This file
 * styles the [ss_consent_preferences] shortcode link and the click-to-load
 * facade shown in place of blocked video embeds.
 */

/*
 * Preferences link (shortcode): inherits the surrounding footer styling.
 * The class is doubled so theme and page-builder `button` rules cannot restyle it.
 */
.ss-consent-preferences.ss-consent-preferences,
.ss-consent-preferences.ss-consent-preferences:hover,
.ss-consent-preferences.ss-consent-preferences:focus {
	display: inline;
	margin: 0;
	padding: 0;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	color: inherit;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.ss-consent-preferences.ss-consent-preferences:hover {
	text-decoration-thickness: 2px;
}

.ss-consent-preferences:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Click-to-load facade for blocked video embeds. */
.ss-consent-facade {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.85em;
	width: 100%;
	min-height: 180px;
	padding: 1.25em;
	box-sizing: border-box;
	text-align: center;
	color: #241f21;
	background: #f1f1f1;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 8px;
}

.ss-consent-facade__msg {
	margin: 0;
	max-width: 42ch;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
}

.ss-consent-facade__btn {
	display: inline-block;
	margin: 0;
	padding: 0.6em 1.1em;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	font-weight: 600;
	line-height: 1;
	color: #ffffff;
	background: #241f21;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.ss-consent-facade__btn:hover {
	opacity: 0.9;
}

.ss-consent-facade__btn:focus-visible {
	outline: 2px solid #241f21;
	outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
	.ss-consent-facade {
		color: #f3f3f3;
		background: #2b2b2b;
		border-color: rgba( 255, 255, 255, 0.15 );
	}

	.ss-consent-facade__btn {
		color: #241f21;
		background: #f3f3f3;
	}

	.ss-consent-facade__btn:focus-visible {
		outline-color: #f3f3f3;
	}
}

/* Cookie policy output. */
.ss-cookie-policy__table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
}

.ss-cookie-policy__table th,
.ss-cookie-policy__table td {
	padding: 0.5em 0.75em;
	text-align: left;
	vertical-align: top;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
}

.ss-cookie-policy__table th {
	background: rgba( 0, 0, 0, 0.04 );
	font-weight: 600;
}

.ss-cookie-policy__note {
	opacity: 0.75;
	font-size: 0.9em;
}

/* Consent control inside the policy: a button in the banner's primary colours. */
.ss-cookie-policy .ss-cookie-policy__manage,
.ss-cookie-policy .ss-cookie-policy__manage:hover,
.ss-cookie-policy .ss-cookie-policy__manage:focus {
	display: inline-block;
	margin: 0;
	padding: 0.7em 1.25em;
	border: 0;
	border-radius: 6px;
	box-shadow: none;
	background: var( --cc-btn-primary-bg, #30363c );
	color: var( --cc-btn-primary-color, #fff );
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
}

.ss-cookie-policy .ss-cookie-policy__manage:hover,
.ss-cookie-policy .ss-cookie-policy__manage:focus {
	background: var( --cc-btn-primary-hover-bg, #000 );
	color: var( --cc-btn-primary-hover-color, #fff );
}

.ss-cookie-policy .ss-cookie-policy__manage:focus-visible {
	outline: 2px solid var( --cc-btn-primary-bg, #30363c );
	outline-offset: 2px;
}

/* Narrow screens: each cookie becomes a labelled card instead of a squeezed row. */
@media (max-width: 600px) {
	.ss-cookie-policy__table thead {
		display: none;
	}

	.ss-cookie-policy__table,
	.ss-cookie-policy__table tbody,
	.ss-cookie-policy__table tr,
	.ss-cookie-policy__table td {
		display: block;
		width: 100%;
	}

	.ss-cookie-policy__table tr {
		margin: 0 0 0.75em;
		border: 1px solid rgba( 0, 0, 0, 0.12 );
	}

	/* Two classes so theme zebra striping cannot tint alternate cards. */
	.ss-cookie-policy .ss-cookie-policy__table tbody > tr > td {
		padding: 0.4em 0.75em;
		border: 0;
		background: none;
	}

	.ss-cookie-policy .ss-cookie-policy__table tbody > tr > td:first-child {
		background: rgba( 0, 0, 0, 0.04 );
		font-weight: 600;
		overflow-wrap: anywhere;
	}

	.ss-cookie-policy__table td[data-label]:not( :first-child )::before {
		content: attr( data-label );
		display: block;
		font-size: 0.78em;
		font-weight: 600;
		opacity: 0.6;
	}
}

@media (prefers-color-scheme: dark) {
	.ss-cookie-policy__table th,
	.ss-cookie-policy__table td {
		border-color: rgba( 255, 255, 255, 0.18 );
	}

	.ss-cookie-policy__table th {
		background: rgba( 255, 255, 255, 0.06 );
	}
}


/* ---------------------------------------------------------------------------
   Modal scrolling
   Keep a wheel over the modal inside the modal. `overscroll-behavior: contain`
   stops the scroll chaining on to the page once the body reaches its end; the
   smooth-scroll exemption that lets the modal receive the wheel at all is the
   [data-lenis-prevent] attribute set in frontend.js.
   --------------------------------------------------------------------------- */
#cc-main .pm__body,
#cc-main .cm__body {
	overscroll-behavior: contain;
}
