/**
 * Brandy Cookie Consent — front end styles.
 *
 * Accessibility notes that are requirements, not preferences:
 *  - Accept and Reject share .bcc-btn-primary on the first layer. They must
 *    stay visually identical. Do not restyle one to be quieter.
 *  - Focus rings are never removed, only restyled.
 *  - Everything respects prefers-reduced-motion.
 *  - Touch targets are >= 44px.
 */

.bcc-root,
.bcc-root * {
	box-sizing: border-box;
}

.bcc-root[hidden] { display: none; }

/* ---------------------------------------------------------------- banner */

.bcc-banner {
	position: fixed;
	z-index: 999998;
	background: var(--bcc-bg, #fff);
	color: var(--bcc-text, #1d2327);
	border-radius: var(--bcc-radius, 10px);
	box-shadow: 0 6px 32px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .08);
	font-size: 15px;
	line-height: 1.55;
	max-width: 440px;
	width: calc(100% - 32px);
	animation: bcc-in .25s ease-out;
}

.bcc-banner[hidden] { display: none; }

.bcc-layout-bar .bcc-banner {
	max-width: none;
	width: 100%;
	left: 0;
	right: 0;
	border-radius: 0;
}

.bcc-layout-bar .bcc-banner-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: flex;
	gap: 24px;
	align-items: center;
	flex-wrap: wrap;
}

.bcc-layout-bar .bcc-message { flex: 1 1 420px; }
.bcc-layout-bar .bcc-actions { flex: 0 0 auto; }

.bcc-pos-bottom-left   .bcc-banner { bottom: 16px; left: 16px; }
.bcc-pos-bottom-right  .bcc-banner { bottom: 16px; right: 16px; }
.bcc-pos-bottom-center .bcc-banner { bottom: 16px; left: 50%; transform: translateX(-50%); }
.bcc-pos-top           .bcc-banner { top: 0; left: 0; right: 0; }

.bcc-layout-bar.bcc-pos-bottom-left .bcc-banner,
.bcc-layout-bar.bcc-pos-bottom-right .bcc-banner,
.bcc-layout-bar.bcc-pos-bottom-center .bcc-banner {
	bottom: 0; left: 0; right: 0; transform: none;
}

.bcc-banner-inner { padding: 22px 24px; }

.bcc-root .bcc-title {
	margin: 0 0 8px !important;
	padding: 0 !important;
	font-family: inherit !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	color: inherit !important;
}

.bcc-message p { margin: 0 0 10px; }
.bcc-message p:last-child { margin-bottom: 0; }

.bcc-controller { font-size: 13px; opacity: .8; }

.bcc-links a {
	color: inherit;
	text-decoration: underline;
	font-size: 13px;
}

.bcc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
	align-items: center;
}

/* ---------------------------------------------------------------- buttons */

/**
 * Defensive specificity.
 *
 * This plugin runs on 252 sites with arbitrary themes. Elementor and most
 * commercial themes style bare `button` and `.elementor-widget button` with
 * enough specificity to win against a single class — on capitalroofingcentre
 * the buttons rendered transparent with the theme's pink text, i.e. an
 * illegible consent banner, which is a compliance problem and not just an
 * ugly one. The doubled class raises specificity; !important covers the rest.
 * Do not "tidy" these away.
 */
.bcc-btn.bcc-btn {
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	letter-spacing: normal !important;
	text-transform: none !important;
	text-decoration: none !important;
	padding: 12px 18px !important;
	min-height: 44px !important;
	width: auto;
	border: 1px solid transparent !important;
	border-radius: calc(var(--bcc-radius, 10px) - 4px) !important;
	cursor: pointer;
	text-align: center;
	box-shadow: none !important;
	transition: filter .15s ease, background-color .15s ease;
}

.bcc-btn.bcc-btn:hover { filter: brightness(.94); }

.bcc-btn:focus-visible,
.bcc-cat-toggle:focus-visible,
.bcc-close:focus-visible,
.bcc-float:focus-visible,
.bcc-embed-allow:focus-visible {
	outline: 3px solid var(--bcc-accent, #1a56db);
	outline-offset: 2px;
}

/* Accept and Reject. Identical by law, near enough. */
.bcc-btn.bcc-btn-primary {
	background: var(--bcc-accent, #1a56db) !important;
	background-image: none !important;
	color: var(--bcc-accent-text, #fff) !important;
	flex: 1 1 auto;
}

.bcc-btn.bcc-btn-secondary {
	background: var(--bcc-secondary, #e5e7eb) !important;
	background-image: none !important;
	color: var(--bcc-secondary-text, #1d2327) !important;
	border-color: rgba(0, 0, 0, .08) !important;
}

.bcc-btn.bcc-btn-link {
	background: none !important;
	background-image: none !important;
	color: inherit !important;
	text-decoration: underline !important;
	padding: 12px 8px !important;
	font-weight: 500 !important;
	flex: 0 0 auto;
}

.bcc-inline-link {
	background: none !important;
	border: 0 !important;
	padding: 0 !important;
	font: inherit !important;
	color: inherit !important;
	text-decoration: underline !important;
	cursor: pointer;
	box-shadow: none !important;
}

/* ----------------------------------------------------------------- modal */

.bcc-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.bcc-modal[hidden] { display: none; }

.bcc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, .55);
	animation: bcc-fade .2s ease-out;
}

.bcc-modal-panel {
	position: relative;
	background: var(--bcc-bg, #fff);
	color: var(--bcc-text, #1d2327);
	border-radius: var(--bcc-radius, 10px);
	width: 100%;
	max-width: 680px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	animation: bcc-in .22s ease-out;
	font-size: 15px;
	line-height: 1.55;
}

.bcc-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.bcc-modal-body {
	padding: 20px 24px;
	overflow-y: auto;
	flex: 1 1 auto;
	-webkit-overflow-scrolling: touch;
}

.bcc-modal-foot {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	padding: 16px 24px;
	border-top: 1px solid rgba(0, 0, 0, .1);
}

.bcc-modal-foot .bcc-btn { flex: 1 1 160px; }

.bcc-root .bcc-close {
	background: none !important;
	color: inherit !important;
	border: 0 !important;
	box-shadow: none !important;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: inherit;
	padding: 4px 10px;
	min-height: 44px;
	min-width: 44px;
	border-radius: 6px;
}

.bcc-prefs-intro { margin: 0 0 18px; }

/* ------------------------------------------------------------ categories */

.bcc-cat {
	border: 1px solid rgba(0, 0, 0, .12);
	border-radius: 8px;
	margin-bottom: 10px;
	overflow: hidden;
}

.bcc-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 4px 14px 4px 4px;
}

.bcc-root .bcc-cat-toggle {
	display: flex;
	align-items: center;
	gap: 10px;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	color: inherit !important;
	cursor: pointer;
	padding: 14px 10px;
	flex: 1 1 auto;
	text-align: left;
	min-height: 44px;
}

.bcc-chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform .2s ease;
	flex: 0 0 auto;
}

.bcc-cat-toggle[aria-expanded="true"] .bcc-chevron { transform: rotate(45deg); }

.bcc-always-on {
	font-size: 13px;
	font-weight: 600;
	color: var(--bcc-accent, #1a56db);
	white-space: nowrap;
}

.bcc-cat-desc {
	padding: 0 16px 16px;
	font-size: 14px;
}

.bcc-cat-desc[hidden] { display: none; }
.bcc-cat-desc p { margin: 0 0 12px; }

/* --------------------------------------------------------------- switch */

.bcc-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	cursor: pointer;
	padding: 10px 0;
}

.bcc-switch input {
	position: absolute;
	opacity: 0;
	width: 46px;
	height: 26px;
	margin: 0;
	cursor: pointer;
}

.bcc-slider {
	width: 46px;
	height: 26px;
	background: #b8bcc4;
	border-radius: 999px;
	transition: background-color .18s ease;
	position: relative;
	display: block;
}

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

.bcc-switch input:checked + .bcc-slider { background: var(--bcc-accent, #1a56db); }
.bcc-switch input:checked + .bcc-slider::after { transform: translateX(20px); }
.bcc-switch input:focus-visible + .bcc-slider {
	outline: 3px solid var(--bcc-accent, #1a56db);
	outline-offset: 2px;
}

/* ---------------------------------------------------------------- tables */

.bcc-table-wrap { overflow-x: auto; }

.bcc-cookie-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	margin: 8px 0 4px;
}

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

.bcc-cookie-table th {
	font-weight: 700;
	white-space: nowrap;
}

.bcc-cookie-table code {
	font-size: 12px;
	word-break: break-all;
	background: rgba(0, 0, 0, .05);
	padding: 1px 4px;
	border-radius: 3px;
}

.bcc-none { font-size: 14px; opacity: .75; }

/* ---------------------------------------------------------- float button */

.bcc-float.bcc-float {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 999997;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid rgba(0, 0, 0, .12);
	background: var(--bcc-bg, #fff);
	color: var(--bcc-text, #1d2327);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, .18) !important;
	padding: 0 !important;
	min-height: 0 !important;
	opacity: .75;
	transition: opacity .15s ease;
}

.bcc-float:hover { opacity: 1; }
.bcc-float[hidden] { display: none; }

.bcc-pos-bottom-right .bcc-float,
.bcc-pos-bottom-right ~ .bcc-float { left: auto; right: 16px; }

/* --------------------------------------------------------- embed blocker */

/**
 * The placeholder is injected in place of a third-party embed, which means it
 * lands inside whatever wrapper the page builder used. Elementor's embed
 * wrappers set `line-height: 0` (to kill the iframe's inline-block gap) and
 * an aspect-ratio `height: 0` + padding-bottom hack. Inherited, that stacks
 * every line of the placeholder on top of itself — verified on
 * capitalroofingcentre's Google Maps widget. Re-assert layout explicitly.
 */
.bcc-embed-placeholder {
	position: relative !important;
	background: #f3f4f6;
	border: 1px dashed #b8bcc4;
	border-radius: 8px;
	height: auto !important;
	min-height: 180px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 24px !important;
	text-align: center !important;
	line-height: 1.55 !important;
	font-size: 15px !important;
}

/* Scoped to the notice only. The iframe is a sibling and must keep whatever
   positioning the page builder gave it — never restyle it from here. */
.bcc-embed-inner,
.bcc-embed-inner * {
	line-height: 1.4 !important;
	height: auto !important;
	position: static !important;
	text-align: center !important;
}

.bcc-embed-inner { max-width: 420px; }

.bcc-embed-text {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
}

/* The address / video title — what the visitor actually wanted. */
.bcc-embed-label {
	margin: 0 0 10px;
	font-size: 16px;
	font-weight: 600;
	color: #1d2327;
}

.bcc-embed-link-wrap { margin: 0 0 14px; }

.bcc-embed-link.bcc-embed-link {
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--bcc-accent, #1a56db) !important;
	text-decoration: underline !important;
	display: inline-block;
	padding: 6px 2px !important;
	min-height: 32px;
}

.bcc-embed-host {
	margin: 0 0 14px;
	font-size: 12px;
	color: #5a6270;
	word-break: break-all;
}

.bcc-embed-allow.bcc-embed-allow {
	font-family: inherit !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-transform: none !important;
	padding: 11px 18px !important;
	min-height: 44px !important;
	border: 0 !important;
	border-radius: 6px !important;
	background: var(--bcc-accent, #1a56db) !important;
	background-image: none !important;
	color: var(--bcc-accent-text, #fff) !important;
	box-shadow: none !important;
	cursor: pointer;
}

/* -------------------------------------------------------------- policy */

.bcc-policy h3 { margin-top: 1.8em; }
.bcc-policy h4 { margin-top: 1.4em; }

.bcc-policy-cats dt { font-weight: 700; margin-top: 12px; }
.bcc-policy-cats dd { margin: 4px 0 0; padding-left: 0; }

.bcc-tag {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .04em;
	background: rgba(0, 0, 0, .08);
	border-radius: 3px;
	padding: 2px 6px;
	vertical-align: middle;
}

.bcc-browser-list { columns: 2; column-gap: 32px; }

/* -------------------------------------------------------------- utility */

.bcc-sr-status,
.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	white-space: nowrap;
}

html.bcc-modal-open { overflow: hidden; }

@keyframes bcc-in {
	from { opacity: 0; transform: translateY(10px); }
	to   { opacity: 1; transform: none; }
}

@keyframes bcc-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.bcc-pos-bottom-center .bcc-banner { animation: none; }

@media (prefers-reduced-motion: reduce) {
	.bcc-banner,
	.bcc-modal-panel,
	.bcc-modal-backdrop { animation: none; }
	.bcc-btn,
	.bcc-slider,
	.bcc-slider::after,
	.bcc-chevron { transition: none; }
}

@media (max-width: 600px) {
	.bcc-banner {
		left: 8px !important;
		right: 8px !important;
		bottom: 8px !important;
		max-width: none;
		width: auto;
		transform: none !important;
	}
	.bcc-banner-inner { padding: 18px; }
	.bcc-actions .bcc-btn-primary { flex: 1 1 100%; }
	.bcc-modal-foot .bcc-btn { flex: 1 1 100%; }
	.bcc-browser-list { columns: 1; }

	/* Stacked cookie tables — headers become inline labels. */
	.bcc-cookie-table thead { display: none; }
	.bcc-cookie-table tr {
		display: block;
		border-bottom: 1px solid rgba(0, 0, 0, .12);
		padding: 8px 0;
	}
	.bcc-cookie-table td {
		display: block;
		border: 0;
		padding: 3px 0;
	}
	.bcc-cookie-table td::before {
		content: attr(data-label) ": ";
		font-weight: 700;
	}
}
