/* =====================================================================
   Cookie consent banner - 1.2.92
   Replaces a wall of inline style="" attributes on the banner markup.

   The single load-bearing rule is the FIRST one. at-cookie.css is only
   ever reached once the head flag script has already decided the visitor's
   state, so the banner is hidden by class and never by inline style. If
   that script is blocked, nothing is hidden - which is the correct failure
   direction for a consent banner.

   Palette follows the .atx-ship precedent: base rules use only tokens that
   exist in BOTH light and dark mode (--at-ctrl-* is dark-only and would
   break light mode), dark values are declared explicitly.
   ===================================================================== */

/* Consent already recorded -> hide before paint. This is what removes the
   flash-of-banner. Do not add a transition here; it would reintroduce one. */
html.at-consent-ok #atco-cookie {
	display: none !important;
}

#atco-cookie {
	position: fixed;
	inset-inline: 16px;
	bottom: 16px;
	z-index: 99999;
	background: var(--at-card-bg, #fff);
	color: var(--at-text, #1d2733);
	border: 1px solid var(--at-line, #e3e8ef);
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(10, 20, 40, .18);
	padding: 16px 18px;
	max-width: 460px;
	font-size: 13.5px;
	line-height: 1.5;
}

.atco-cookie-msg {
	margin: 0;
}

.atco-cookie-msg a {
	color: var(--at-blue, #0b5cab);
	font-weight: 600;
}

.atco-cookie-actions {
	margin-top: 12px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.atco-btn {
	border: 0;
	border-radius: 8px;
	padding: 8px 18px;
	font: inherit;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
}

.atco-accept {
	background: var(--at-blue, #0b5cab);
	color: #fff;
}

.atco-accept:hover { filter: brightness(1.08); }
.atco-accept:active { filter: brightness(.94); }

.atco-decline {
	background: var(--at-bg, #eef1f4);
	color: var(--at-muted, #46566b);
	font-weight: 600;
}

.atco-decline:hover { background: var(--at-line, #dbe5ee); }

/* Focus ring drawn with an offset so it stays visible on the dark panel
   surface as well as on the light card. */
.atco-btn:focus-visible {
	outline: 3px solid var(--at-blue, #0b5cab);
	outline-offset: 2px;
}

/* Dark mode. --at-blue on --at-card-bg is low contrast, so the accept
   button uses an explicit light ink and the focus ring a light blue. */
html[data-theme="dark"] #atco-cookie {
	background: #16243a;
	color: #dbe7f4;
	border-color: #2a3b52;
}

html[data-theme="dark"] .atco-cookie-msg a { color: #7db3ee; }

html[data-theme="dark"] .atco-accept {
	background: #2f6fb5;
	color: #f2f8ff;
}

html[data-theme="dark"] .atco-decline {
	background: #1d2f47;
	color: #b9cde2;
}

html[data-theme="dark"] .atco-decline:hover { background: #27405f; }

html[data-theme="dark"] .atco-btn:focus-visible {
	outline-color: #7db3ee;
}

/* The banner is anchored bottom-inline-start on wide screens and centred
   full-width on a phone. `inset-inline` above already flips with dir=rtl. */
@media (max-width: 768px) {
	#atco-cookie {
		inset-inline: 12px;
		bottom: calc(73px + env(safe-area-inset-bottom, 0px));
		padding: 14px 15px;
		max-width: none;
	}

	.atco-cookie-actions > * { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	.atco-btn { transition: none; }
}