/*
 * ACS Cyber Core - functional baseline styles for plugin output (Calendly embeds and popup close button, privacy
 * choices dialog). Every selector is wrapped in :where() (zero specificity) so the acs-cyber theme always wins;
 * these rules only keep things usable with any theme. Theme tokens are used when present. Exceptions with real
 * specificity are marked (Calendly close icon, HubSpot web-interactive guard).
 */

/*
 * HubSpot web-interactive guard (owner decision 2, build-spec section 1: every expert CTA opens the Calendly popup
 * with a7 + UTM attribution; never send visitors elsewhere to convert). The shared HubSpot portal can target
 * slide-in / pop-up CTAs at this site; they cover the hero and sticky-bar CTAs and link to a booking destination
 * set in HubSpot, so bookings lose their attribution. Hide every web-interactive container. Only the containers
 * are hidden: the HubSpot tracking script (hs-script-loader) still loads and tracks page views.
 * Real specificity and !important on purpose (not :where), so HubSpot's own stylesheet cannot re-show them.
 * The owner should also exclude acscyber.net from the interactive's targeting in HubSpot.
 */
#hs-web-interactives-top-anchor,
#hs-web-interactives-bottom-anchor,
#hs-web-interactives-floating-container,
[id^="hs-overlay-cta-"],
[id^="hs-web-interactive-"] {
	display: none !important;
}

/* Inline scheduler: the iframe fills the reserved height; Calendly renders light, so force a light color scheme. */
:where(.acsc-calendly) {
	position: relative;
	width: 100%;
}
:where(.acsc-calendly) > iframe {
	display: block;
	width: 100%;
	height: 100%;
	min-height: inherit;
	border: 0;
}
:where(.acsc-calendly iframe, .calendly-overlay iframe) {
	color-scheme: light;
}
:where(.acsc-calendly__fallback) {
	padding: 1.25rem;
}
:where(.acsc-calendly.is-loaded .acsc-calendly__fallback) {
	display: none;
}

/* Calendly popup: our accessible close button replaces Calendly's background-image close icon. */
/* Real specificity here (not :where) so it beats Calendly's own widget.css. */
.calendly-overlay.acsc-cal-open .calendly-popup-close {
	display: none;
}
:where(.acsc-cal-close) {
	position: fixed;
	top: max(12px, env(safe-area-inset-top));
	right: max(12px, env(safe-area-inset-right));
	z-index: 2147483647;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 999px;
	background: #0d1530;
	color: #fff;
	cursor: pointer;
}
:where(.acsc-cal-close:hover) {
	background: #121c3d;
}
:where(.acsc-cal-close:focus-visible) {
	outline: 3px solid var(--acs-focus, #7dd8ff);
	outline-offset: 3px;
}

/* Privacy choices dialog. */
:where(.acsc-privacy) {
	box-sizing: border-box;
	width: min(34rem, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	overflow: auto;
	padding: 1.5rem;
	border: 1px solid var(--acs-border-strong, rgba(140, 155, 255, 0.3));
	border-radius: var(--acs-r, 14px);
	background: var(--acs-surface, #0d1530);
	color: var(--acs-text, #eef1ff);
	line-height: 1.55;
}
:where(.acsc-privacy)::backdrop {
	background: rgba(4, 6, 15, 0.72);
}
:where(.acsc-privacy h2) {
	margin: 0 0 0.75rem;
	font-size: 1.375rem;
	line-height: 1.25;
}
:where(.acsc-privacy p, .acsc-privacy ul) {
	margin: 0 0 0.875rem;
}
:where(.acsc-privacy ul) {
	padding-left: 1.25rem;
}
:where(.acsc-privacy a) {
	color: var(--acs-link, #9aa6ff);
	text-decoration: underline;
}
:where(.acsc-privacy__gpc) {
	padding: 0.625rem 0.875rem;
	border-left: 3px solid var(--acs-amber, #ffb547);
	background: rgba(255, 181, 71, 0.08);
}
:where(.acsc-privacy__gpc[hidden], .acsc-privacy__status:empty) {
	display: none;
}
:where(.acsc-privacy__status) {
	font-weight: 600;
}
:where(.acsc-privacy__actions) {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.25rem;
}
:where(.acsc-privacy__actions button) {
	min-height: 44px;
	padding: 0.625rem 1.125rem;
	border: 1px solid var(--acs-border-strong, rgba(140, 155, 255, 0.3));
	border-radius: 10px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
:where(.acsc-privacy__actions .acsc-privacy__save) {
	border-color: var(--acs-primary, #3346ff);
	background: var(--acs-primary, #3346ff);
	color: #fff;
}
:where(.acsc-privacy button:focus-visible) {
	outline: 3px solid var(--acs-focus, #7dd8ff);
	outline-offset: 3px;
}

/* Switch: role="switch" button with aria-checked. */
:where(.acsc-switch) {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 44px;
	margin: 0.25rem 0 0.875rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
:where(.acsc-switch__track) {
	position: relative;
	flex: none;
	width: 46px;
	height: 26px;
	border: 1px solid var(--acs-border-strong, rgba(140, 155, 255, 0.3));
	border-radius: 999px;
	background: var(--acs-bg, #060a17);
	transition: background-color 0.18s ease;
}
:where(.acsc-switch__track)::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--acs-text-muted, #b9c1e0);
	transition: transform 0.18s ease;
}
:where(.acsc-switch[aria-checked="true"] .acsc-switch__track) {
	border-color: var(--acs-primary, #3346ff);
	background: var(--acs-primary, #3346ff);
}
:where(.acsc-switch[aria-checked="true"] .acsc-switch__track)::after {
	background: #fff;
	transform: translateX(20px);
}
:where(.acsc-switch[aria-disabled="true"]) {
	cursor: not-allowed;
	opacity: 0.65;
}
@media (prefers-reduced-motion: reduce) {
	:where(.acsc-switch__track),
	:where(.acsc-switch__track)::after {
		transition: none;
	}
}
