/* OpenBus Ischia — cookie consent (banner, preference centre, reopen button). */
.obi-cc, .obi-cc-modal, .obi-cc-fab, .obi-cc-toast {
	--cc-g: #15A249; --cc-gd: #0f7f38; --cc-gl: #34c26a; --cc-g50: #ecfaf1;
	--cc-ink: #0f172a; --cc-mute: #5b6577; --cc-line: #e5e9f0; --cc-soft: #f5f7fa;
	--cc-crumb: #c98a3d; --cc-dough: #f2c78a; --cc-chip: #6b3f1d;
	--cc-f-body: "Figtree", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--cc-f-head: "Unbounded", "Figtree", system-ui, sans-serif;
	--cc-ease: cubic-bezier(.2, .9, .25, 1.15);
	font-family: var(--cc-f-body); color: var(--cc-ink); -webkit-font-smoothing: antialiased;
}
.obi-cc *, .obi-cc-modal *, .obi-cc-fab *, .obi-cc-toast * { box-sizing: border-box; }
.obi-cc[hidden], .obi-cc-modal[hidden], .obi-cc-fab[hidden], .obi-cc-toast[hidden] { display: none !important; }
.obi-cc button, .obi-cc-modal button, .obi-cc-fab { font: inherit; }
.obi-cc svg, .obi-cc-modal svg, .obi-cc-fab svg, .obi-cc-toast svg { display: block; }

/* ---------- Banner ---------- */
.obi-cc {
	position: fixed; z-index: 99990; left: max(18px, env(safe-area-inset-left)); bottom: max(18px, env(safe-area-inset-bottom));
	width: min(420px, calc(100vw - 36px));
	opacity: 0; transform: translateY(28px) scale(.97); transform-origin: bottom left;
	transition: opacity .35s ease, transform .5s var(--cc-ease);
}
.obi-cc.is-in { opacity: 1; transform: none; }
.obi-cc.is-out { opacity: 0; transform: translateY(18px) scale(.9); transition: opacity .25s ease, transform .3s ease; }
.obi-cc-card {
	position: relative; overflow: hidden; background: #fff; border: 1px solid var(--cc-line); border-radius: 24px;
	padding: 22px 22px 16px; box-shadow: 0 28px 60px -18px rgba(15, 23, 42, .35), 0 6px 18px -6px rgba(15, 23, 42, .12);
}
.obi-cc-card::before {
	content: ""; position: absolute; inset: 0 0 auto; height: 4px;
	background: linear-gradient(90deg, var(--cc-g), var(--cc-gl), #f5b94a, var(--cc-g)); background-size: 300% 100%;
	animation: obi-cc-flow 6s linear infinite;
}
.obi-cc-head { display: flex; align-items: center; gap: 14px; margin: 2px 34px 10px 0; }
.obi-cc-title { margin: 0; font: 700 17px/1.25 var(--cc-f-head); letter-spacing: -.01em; color: var(--cc-ink); }
.obi-cc-text { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--cc-mute); }
.obi-cc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.obi-cc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.obi-cc-legal { display: inline-flex; gap: 12px; }
.obi-cc-legal a { font-size: 12.5px; color: var(--cc-mute); text-decoration: underline; text-underline-offset: 2px; }
.obi-cc-legal a:hover { color: var(--cc-g); }

/* The cookie */
.obi-cc-cookie { position: relative; flex: none; width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; background: #fff6e8; }
.obi-cc-cookie svg { width: 32px; height: 32px; animation: obi-cc-wobble 3.4s ease-in-out 1s infinite; transform-origin: 50% 60%; }
.obi-cc-cookie-body { fill: var(--cc-dough); stroke: var(--cc-crumb); stroke-width: 1.6; }
.obi-cc-chip { fill: var(--cc-chip); }
.obi-cc-cookie i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cc-crumb); opacity: 0; }
.obi-cc-cookie i:nth-of-type(1) { right: 6px; top: 10px; animation: obi-cc-crumb 3.4s ease-in 1.5s infinite; }
.obi-cc-cookie i:nth-of-type(2) { right: 10px; top: 6px; width: 3px; height: 3px; animation: obi-cc-crumb 3.4s ease-in 1.6s infinite; }
.obi-cc-cookie i:nth-of-type(3) { right: 4px; top: 16px; width: 3px; height: 3px; animation: obi-cc-crumb 3.4s ease-in 1.7s infinite; }
.obi-cc-cookie--sm { width: 42px; height: 42px; border-radius: 13px; }
.obi-cc-cookie--sm svg { width: 28px; height: 28px; animation: none; }

/* Buttons */
.obi-cc-btn {
	display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 16px; border-radius: 14px;
	font-size: 14.5px; font-weight: 700; line-height: 1.1; cursor: pointer; text-align: center;
	transition: transform .15s ease, background-color .2s, color .2s, border-color .2s, box-shadow .2s;
}
.obi-cc-btn:active { transform: scale(.97); }
.obi-cc-btn--solid { background: var(--cc-g); color: #fff; border: 2px solid var(--cc-g); box-shadow: 0 8px 18px -8px rgba(21, 162, 73, .7); }
.obi-cc-btn--solid:hover { background: var(--cc-gd); border-color: var(--cc-gd); }
.obi-cc-btn--line { background: #fff; color: var(--cc-ink); border: 2px solid var(--cc-ink); }
.obi-cc-btn--line:hover { background: var(--cc-ink); color: #fff; }
.obi-cc-link {
	display: inline-flex; align-items: center; gap: 7px; padding: 6px 2px; border: 0; background: none; cursor: pointer;
	font-size: 14px; font-weight: 700; color: var(--cc-g);
}
.obi-cc-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.obi-cc-link:hover span { text-decoration: underline; text-underline-offset: 3px; }
.obi-cc-x {
	position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 50%; border: 0; cursor: pointer;
	display: grid; place-items: center; background: var(--cc-soft); color: var(--cc-mute); transition: background .2s, color .2s, transform .3s var(--cc-ease);
}
.obi-cc-x:hover { background: var(--cc-ink); color: #fff; transform: rotate(90deg); }
.obi-cc-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.obi-cc-x--static { position: static; flex: none; }
.obi-cc :focus-visible, .obi-cc-modal :focus-visible, .obi-cc-fab:focus-visible { outline: 3px solid rgba(21, 162, 73, .45); outline-offset: 2px; }

/* ---------- Preference centre ---------- */
.obi-cc-modal {
	position: fixed; inset: 0; z-index: 99995; display: flex; align-items: center; justify-content: center; padding: 16px;
	background: rgba(15, 23, 42, 0); -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0);
	transition: background .3s ease, backdrop-filter .3s ease;
}
.obi-cc-modal.is-in { background: rgba(15, 23, 42, .55); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.obi-cc-sheet {
	width: min(640px, 100%); max-height: min(760px, calc(100vh - 32px)); display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border-radius: 26px; box-shadow: 0 40px 80px -20px rgba(2, 6, 23, .5); outline: none;
	opacity: 0; transform: translateY(24px) scale(.97); transition: opacity .3s ease, transform .45s var(--cc-ease);
}
.obi-cc-modal.is-in .obi-cc-sheet { opacity: 1; transform: none; }
.obi-cc-sheet-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 16px; border-bottom: 1px solid var(--cc-line); }
.obi-cc-sheet-head > div { flex: 1; min-width: 0; }
.obi-cc-sheet-head h2 { margin: 2px 0 6px; font: 700 19px/1.25 var(--cc-f-head); color: var(--cc-ink); }
.obi-cc-sheet-head p { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--cc-mute); }
.obi-cc-cats { flex: 1; overflow-y: auto; padding: 14px 22px; overscroll-behavior: contain; }
.obi-cc-cat {
	border: 1.5px solid var(--cc-line); border-radius: 18px; padding: 14px 16px; margin-bottom: 10px; background: #fff;
	transition: border-color .25s, background-color .25s, box-shadow .25s; animation: obi-cc-rise .45s var(--cc-ease) both;
}
.obi-cc-cat:nth-child(2) { animation-delay: .05s; } .obi-cc-cat:nth-child(3) { animation-delay: .1s; } .obi-cc-cat:nth-child(4) { animation-delay: .15s; }
.obi-cc-cat.is-on { border-color: rgba(21, 162, 73, .45); background: var(--cc-g50); }
.obi-cc-cat-head { display: flex; align-items: center; gap: 12px; }
.obi-cc-cat-title { flex: 1; font-size: 15px; font-weight: 800; color: var(--cc-ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.obi-cc-count { font-size: 11.5px; font-weight: 700; color: var(--cc-mute); background: var(--cc-soft); border-radius: 999px; padding: 3px 8px; }
.obi-cc-cat.is-on .obi-cc-count { background: #fff; }
.obi-cc-cat-body { margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--cc-mute); }
.obi-cc-badge { font-size: 12px; font-weight: 800; color: var(--cc-gd); background: #fff; border: 1.5px solid rgba(21, 162, 73, .35); border-radius: 999px; padding: 5px 10px; white-space: nowrap; }

/* Switch */
.obi-cc-switch { position: relative; flex: none; width: 52px; height: 30px; cursor: pointer; }
.obi-cc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.obi-cc-track { position: absolute; inset: 0; border-radius: 999px; background: #cfd6e0; transition: background .25s; }
.obi-cc-knob {
	position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
	box-shadow: 0 2px 6px rgba(15, 23, 42, .25); display: grid; place-items: center; transition: transform .35s var(--cc-ease);
}
.obi-cc-knob svg { width: 14px; height: 14px; fill: none; stroke: var(--cc-g); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 20; stroke-dashoffset: 20; transition: stroke-dashoffset .3s ease .1s; }
.obi-cc-switch input:checked ~ .obi-cc-track { background: var(--cc-g); }
.obi-cc-switch input:checked ~ .obi-cc-knob { transform: translateX(22px); }
.obi-cc-switch input:checked ~ .obi-cc-knob svg { stroke-dashoffset: 0; }
.obi-cc-switch input:focus-visible ~ .obi-cc-track { outline: 3px solid rgba(21, 162, 73, .45); outline-offset: 2px; }

/* Cookie details */
.obi-cc-more { margin-top: 8px; }
.obi-cc-more > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--cc-g); padding: 4px 0;
}
.obi-cc-more > summary::-webkit-details-marker { display: none; }
.obi-cc-more > summary svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; transition: transform .25s; }
.obi-cc-more[open] > summary svg { transform: rotate(180deg); }
.obi-cc-list { margin: 8px 0 2px; display: grid; gap: 8px; animation: obi-cc-rise .3s ease both; }
.obi-cc-item { background: #fff; border: 1px solid var(--cc-line); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; line-height: 1.5; color: var(--cc-mute); }
.obi-cc-item b { display: block; font-family: ui-monospace, "IBM Plex Mono", SFMono-Regular, Menlo, monospace; font-size: 12.5px; color: var(--cc-ink); word-break: break-word; }
.obi-cc-item small { display: inline-block; margin-top: 4px; font-weight: 700; color: var(--cc-ink); }
.obi-cc-none { font-size: 12.5px; color: var(--cc-mute); font-style: italic; margin: 8px 0 0; }

.obi-cc-sheet-foot { border-top: 1px solid var(--cc-line); background: #fafbfc; padding: 12px 22px 18px; }
.obi-cc-updated { margin: 0 0 10px; font-size: 11.5px; color: var(--cc-mute); }
.obi-cc-sheet-actions { display: grid; grid-template-columns: 1fr 1fr 1.25fr; gap: 10px; }

/* ---------- Reopen button + toast ---------- */
.obi-cc-fab {
	position: fixed; z-index: 54; left: max(16px, env(safe-area-inset-left)); bottom: max(16px, env(safe-area-inset-bottom));
	width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--cc-line); background: #fff; cursor: pointer;
	display: grid; place-items: center; box-shadow: 0 10px 24px -8px rgba(15, 23, 42, .35);
	transform: scale(0) rotate(-90deg); transition: transform .5s var(--cc-ease), bottom .3s ease, box-shadow .2s;
}
.obi-cc-fab.is-in { transform: none; }
.obi-cc-fab:hover { box-shadow: 0 14px 28px -8px rgba(21, 162, 73, .55); }
.obi-cc-fab:hover svg { animation: obi-cc-wobble .9s ease-in-out; }
.obi-cc-fab svg { width: 28px; height: 28px; }
body.obi-cc-fab-on .obh-activity { bottom: 74px; }
.obi-cc-toast {
	position: fixed; z-index: 99996; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); display: inline-flex; align-items: center; gap: 10px;
	background: var(--cc-ink); color: #fff; border-radius: 999px; padding: 11px 18px 11px 14px; font-size: 14px; font-weight: 700;
	box-shadow: 0 16px 34px -10px rgba(2, 6, 23, .5); opacity: 0; transform: translate(-50%, 16px); transition: opacity .3s, transform .4s var(--cc-ease);
}
.obi-cc-toast.is-in { opacity: 1; transform: translate(-50%, 0); }
.obi-cc-toast svg { width: 20px; height: 20px; fill: none; stroke: var(--cc-gl); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; transition: stroke-dashoffset .4s ease .15s; }
.obi-cc-toast.is-in svg { stroke-dashoffset: 0; }

/* ---------- Motion ---------- */
@keyframes obi-cc-flow { to { background-position: 300% 0; } }
@keyframes obi-cc-wobble { 0%, 60%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg) scale(1.05); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-5deg); } }
@keyframes obi-cc-crumb { 0%, 40% { opacity: 0; transform: translate(0, 0); } 45% { opacity: 1; } 75% { opacity: 0; transform: translate(6px, 18px); } 100% { opacity: 0; } }
@keyframes obi-cc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.obi-cc { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); width: auto; }
	.obi-cc-card { padding: 20px 18px 14px; border-radius: 22px; }
	.obi-cc-title { font-size: 16px; }
	.obi-cc-text { font-size: 13.5px; }
	.obi-cc-modal { align-items: flex-end; padding: 0; }
	.obi-cc-sheet { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; transform: translateY(100%); transition: transform .45s cubic-bezier(.2, .8, .2, 1), opacity .2s; }
	.obi-cc-sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 99px; background: #d5dbe4; margin: 8px auto 0; }
	.obi-cc-sheet-head { padding: 12px 18px 14px; }
	.obi-cc-cats { padding: 12px 14px; }
	.obi-cc-sheet-foot { padding: 10px 14px calc(14px + env(safe-area-inset-bottom)); }
	.obi-cc-sheet-actions { grid-template-columns: 1fr 1fr; }
	.obi-cc-sheet-actions .obi-cc-btn--solid { grid-column: 1 / -1; order: -1; }
	body.obi-sticky-on .obi-cc-fab { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
	.obi-cc, .obi-cc-sheet, .obi-cc-fab, .obi-cc-toast, .obi-cc-knob, .obi-cc-modal { transition-duration: .01ms !important; }
	.obi-cc *, .obi-cc-modal *, .obi-cc-fab * { animation: none !important; }
	.obi-cc-card::before { animation: none; }
}
