/*!
 * SmartDocs cookie consent banner
 * -----------------------------------------------------------------------------
 * Standalone styling, deliberately not built from the page's own Elementor
 * classes: those are per-widget generated CSS and can change page to page,
 * this banner has to look the same and keep working on every one of them.
 * Layout and colour match the reference banner on smartdocs.ai: plain
 * stacked text sections (no card borders) and a dark green accent on the
 * link and buttons.
 */

.sdcc-overlay,
.sdcc-overlay *,
.sdcc-overlay *::before,
.sdcc-overlay *::after,
.sdcc-manage-link {
	box-sizing: border-box;
}

.sdcc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	z-index: 999998;
	display: flex;
	align-items: stretch;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.sdcc-overlay.sdcc-visible {
	opacity: 1;
}
.sdcc-overlay[hidden] {
	display: none;
}

.sdcc-panel {
	box-sizing: border-box;
	position: relative;
	width: min(420px, 82%);
	max-width: 100%;
	height: 100%;
	background: #ffffff;
	color: #111111;
	box-shadow: 2px 0 24px rgba(0, 0, 0, 0.18);
	overflow-y: auto;
	padding: 40px 36px 0;
	font-family: "Instrument Sans", "IBM Plex Sans", -apple-system, sans-serif;
	transform: translateX(-24px);
	transition: transform 0.3s ease;
	display: flex;
	flex-direction: column;
}
.sdcc-overlay.sdcc-visible .sdcc-panel {
	transform: translateX(0);
}

.sdcc-panel .sdcc-close {
	position: absolute;
	top: 24px;
	right: 24px;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e2e2e2;
	background: #ffffff;
	border-radius: 50%;
	cursor: pointer;
	color: #444444;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.sdcc-panel .sdcc-close svg {
	/* Flex item inside the centered close button - without flex:none, the
	   default flex-shrink:1 plus min-width:auto shrinks a content-less SVG
	   (no glyph metrics for flexbox to size against) straight down to 0
	   width, even with an explicit width attribute and !important. */
	display: block;
	flex: none;
}
.sdcc-panel .sdcc-close:hover {
	background: #f5f5f5;
	border-color: #cccccc;
}

.sdcc-panel h2 {
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 16px;
	padding-right: 40px;
}

.sdcc-panel p {
	font-size: 0.95rem;
	line-height: 1.55;
	color: #333333;
	margin: 0 0 16px;
}
.sdcc-panel p:last-of-type {
	margin-bottom: 0;
}

.sdcc-panel a {
	color: #1f5d46;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.sdcc-intro {
	margin-bottom: 20px;
}

.sdcc-groups {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 8px 0 24px;
}

.sdcc-group-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.sdcc-group-head h3 {
	font-size: 0.95rem;
	font-weight: 600;
	margin: 0 0 6px;
}

.sdcc-group p {
	margin: 0;
	font-size: 0.95rem;
	line-height: 1.55;
	color: #333333;
}

.sdcc-lock {
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #777777;
	white-space: nowrap;
}

/* Toggle switch */
.sdcc-switch {
	position: relative;
	display: inline-block;
	width: 42px;
	height: 24px;
	flex: none;
}
.sdcc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}
.sdcc-switch .sdcc-track {
	position: absolute;
	inset: 0;
	background: #d9d9d9;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease;
}
.sdcc-switch .sdcc-track::before {
	content: "";
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #ffffff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.sdcc-switch input:checked + .sdcc-track {
	background: #1f5d46;
}
.sdcc-switch input:checked + .sdcc-track::before {
	transform: translateX(18px);
}
.sdcc-switch input:disabled + .sdcc-track {
	background: #1f5d46;
	cursor: default;
	opacity: 0.55;
}
.sdcc-switch input:focus-visible + .sdcc-track {
	outline: 2px solid #1f5d46;
	outline-offset: 2px;
}

/*
 * Pinned to the bottom of the panel's own scroll area (not margin-top:auto)
 * so the buttons stay reachable even when the category text runs longer
 * than the viewport - otherwise a short window means scrolling past the
 * last category never quite gets there and the buttons are unreachable.
 *
 * Deliberate two-row layout (Customize/Reject sharing a row, Accept All
 * full-width below) rather than one row of three that wraps as soon as the
 * panel is a little narrow - three buttons plus two gaps came within about
 * 15px of the 420px panel's content width, so it wrapped unpredictably
 * (Accept All alone, an uneven row above it) on laptop-width windows.
 */
.sdcc-actions {
	position: sticky;
	bottom: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 12px -36px 0;
	padding: 14px 36px 32px;
	background: #ffffff;
	box-shadow: 0 -8px 12px -4px rgba(255, 255, 255, 0.9);
}

/*
 * Specificity note: the page's own theme CSS resets buttons with selectors
 * like "html button" - two type selectors plus zero classes tie with a
 * single class on the class-count column, and win on the type-selector
 * count below it. Scoping to .sdcc-panel/.sdcc-overlay adds a second class
 * so these rules win without reaching for !important.
 */
.sdcc-panel .sdcc-btn {
	appearance: none;
	border: 1.5px solid #1f5d46;
	border-radius: 8px;
	padding: 11px 22px;
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	background: #ffffff;
	color: #1f5d46;
	transition: background 0.15s ease, color 0.15s ease;
}
.sdcc-panel .sdcc-btn:hover {
	background: #eaf2ee;
}
.sdcc-panel .sdcc-btn-primary {
	background: #1f5d46;
	color: #ffffff;
}
.sdcc-panel .sdcc-btn-primary:hover {
	background: #174736;
}
.sdcc-actions-row {
	display: flex;
	gap: 10px;
}
.sdcc-actions-row .sdcc-btn {
	flex: 1 1 0;
	min-width: 0;
	padding-left: 12px;
	padding-right: 12px;
}
.sdcc-btn-full {
	/* .sdcc-actions is column-direction, so this is a direct child sized on
	   the main (vertical) axis - flex:0 0 auto keeps it its natural height
	   instead of stretching to fill the container like flex:1 would. */
	flex: 0 0 auto;
	width: 100%;
}

/*
 * This button lives outside .sdcc-panel (it's a page-level element, not
 * part of the dialog), so it doesn't get the extra-class specificity bump
 * above. It only overrides four properties, so !important here is simpler
 * than inventing a second class just to win a tie against "html button".
 */
.sdcc-manage-link {
	position: fixed;
	left: 18px;
	bottom: 18px;
	z-index: 999997;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #ffffff !important;
	color: #111111 !important;
	border: 1px solid #dddddd !important;
	border-radius: 999px !important;
	padding: 9px 16px;
	font-family: "Instrument Sans", "IBM Plex Sans", -apple-system, sans-serif;
	font-size: 0.8rem;
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	cursor: pointer;
}
.sdcc-manage-link:hover {
	background: #f5f5f5 !important;
}
.sdcc-manage-link[hidden] {
	display: none;
}
.sdcc-manage-link svg {
	width: 15px;
	height: 15px;
	flex: none;
}

@media (max-width: 520px) {
	.sdcc-panel {
		padding: 28px 20px 0;
	}
	.sdcc-panel h2 {
		font-size: 1.2rem;
	}
	.sdcc-actions {
		margin: 12px -20px 0;
		padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
	}
	/*
	 * All three stacked full-width, Accept All first - matches the
	 * reference on smartdocs.ai. .sdcc-actions-row drops from a row to a
	 * column so Customize/Reject All each take the full width too, and
	 * order:-1 moves Accept All (a later sibling in the markup, since
	 * "primary action last" reads naturally in the two-row desktop
	 * layout) up above that row without touching the DOM.
	 */
	.sdcc-actions-row {
		flex-direction: column;
		gap: 10px;
	}
	.sdcc-actions-row .sdcc-btn {
		flex: 0 0 auto;
		min-width: 0;
	}
	.sdcc-btn-full {
		order: -1;
	}
	/* Taller targets - easier to hit accurately with a thumb than the
	   desktop size, and full width now leaves plenty of room either way. */
	.sdcc-panel .sdcc-btn {
		padding: 13px 16px;
		font-size: 0.95rem;
	}
	.sdcc-panel .sdcc-close {
		width: 40px;
		height: 40px;
		top: 16px;
		right: 16px;
	}
	.sdcc-switch {
		width: 46px;
		height: 27px;
	}
	.sdcc-switch .sdcc-track::before {
		width: 21px;
		height: 21px;
	}
	.sdcc-switch input:checked + .sdcc-track::before {
		transform: translateX(19px);
	}
	.sdcc-manage-link span {
		display: none;
	}
	.sdcc-manage-link {
		left: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		padding: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sdcc-overlay,
	.sdcc-panel,
	.sdcc-switch .sdcc-track,
	.sdcc-switch .sdcc-track::before {
		transition: none;
	}
}
