/* ==========================================================================
   AP Transportas: cookie banner + settings dialog
   ========================================================================== */

.cookie-banner {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 150;
	width: min(440px, calc(100vw - 40px));
	padding: 24px;
	background: var(--white);
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	font-size: .92rem;
	line-height: 1.55;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner__title { margin-bottom: 8px; font-size: 1.3rem; color: var(--navy-900); }
.cookie-banner__text { margin-bottom: 18px; color: var(--muted); }
.cookie-banner__text a { color: var(--blue-700); text-decoration: underline; }
.cookie-banner__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}
.cookie-banner__actions .btn,
.cookie-dialog__actions .btn {
	min-height: 44px;
	padding: 10px 14px;
	font-size: .92rem;
	white-space: normal;
}
.cookie-banner__actions .btn--outline { grid-column: 1 / -1; }

@media (max-width: 520px) {
	.cookie-banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
		border-radius: var(--radius) var(--radius) 0 0;
		border-inline: 0;
		border-bottom: 0;
	}
}

/* Dialog ------------------------------------------------------------------ */
.cookie-dialog {
	width: min(600px, calc(100vw - 32px));
	max-height: calc(100dvh - 32px);
	padding: 0;
	border: 0;
	border-radius: var(--radius-lg);
	background: var(--white);
	color: var(--ink);
	box-shadow: var(--shadow-lg);
}
.cookie-dialog::backdrop { background: rgb(6 20 30 / 60%); backdrop-filter: blur(2px); }
.cookie-dialog__inner { padding: clamp(22px, 4vw, 32px); }
.cookie-dialog__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}
.cookie-dialog__title { font-size: 1.6rem; color: var(--navy-900); }
.cookie-dialog__close {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--tint);
	color: var(--navy-900);
}
.cookie-dialog__close:hover { background: var(--line); }
.cookie-dialog__text { color: var(--muted); font-size: .95rem; }

.cookie-options { margin: 20px 0 24px; border-top: 1px solid var(--line); }
.cookie-option { padding: 16px 0; border-bottom: 1px solid var(--line); }
.cookie-option__row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	cursor: pointer;
}
.cookie-option__text { display: grid; gap: 2px; font-size: .9rem; color: var(--muted); }
.cookie-option__text strong { font-size: 1rem; color: var(--navy-900); }
.cookie-option__note { display: block; margin-top: 6px; font-size: .8rem; font-weight: 600; color: var(--blue-700); }

.cookie-dialog__actions {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}
@media (max-width: 560px) {
	.cookie-dialog__actions { grid-template-columns: 1fr; }
}

/* Switch ------------------------------------------------------------------ */
.switch { position: relative; flex: none; width: 48px; height: 28px; margin-top: 2px; }
.switch input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.switch input:disabled { cursor: not-allowed; }
.switch__track {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #b8c6d1;
	transition: background-color .2s;
}
.switch__track::after {
	content: '';
	position: absolute;
	top: 3px;
	left: 3px;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--white);
	box-shadow: 0 1px 3px rgb(0 0 0 / 25%);
	transition: transform .2s var(--ease);
}
.switch input:checked + .switch__track { background: var(--blue-600); }
.switch input:checked + .switch__track::after { transform: translateX(20px); }
.switch input:disabled + .switch__track { opacity: .55; }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--blue); outline-offset: 2px; }
