/* UNIPG Racing Team — cookie consent, legal footer and legal pages (v66, WordPress theme) */
.cc-banner {
  position: fixed;
  z-index: 120;
  left: clamp(12px,2.4vw,32px);
  right: clamp(12px,2.4vw,32px);
  bottom: clamp(12px,2.4vw,32px);
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: end;
  gap: 18px 36px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px clamp(20px,3vw,34px);
  background: rgba(10,14,24,.96);
  border: 1px solid rgba(255,255,255,.26);
  border-left: 3px solid var(--electric,#305bff);
  color: #fff;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  backdrop-filter: blur(14px);
  font: 400 15px/1.55 Text,Arial,sans-serif;
  animation: cc-in .45s cubic-bezier(.2,.7,.2,1) both;
}
.cc-banner[hidden], .cc-dialog:not([open]) { display: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cc-banner { animation: none; } }
.cc-kicker { display: block; margin-bottom: 6px; color: #8f9cff; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.cc-title { margin: 0 0 8px; font: 700 clamp(20px,2vw,26px)/1.05 Race,'Arial Narrow',Arial,sans-serif; letter-spacing: .01em; text-transform: uppercase; }
.cc-text { margin: 0; max-width: 70ch; color: #cbd5e8; }
.cc-text a, .cc-dialog a { color: #fff; text-underline-offset: 4px; }
.cc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.cc-btn {
  min-height: 46px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,.55);
  background: transparent;
  color: #fff;
  font: 600 12px/1 Text,Arial,sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
.cc-btn:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + span { outline: 2px solid #b9cdff; outline-offset: 3px; }
.cc-btn-strong { background: #fff; border-color: #fff; color: #080a0e; }
.cc-btn-strong:hover { background: #dce6ff; border-color: #dce6ff; }
.cc-btn-link { border-color: transparent; text-decoration: underline; text-underline-offset: 5px; padding: 0 8px; }
.cc-close {
  position: absolute; top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: 0; background: transparent; color: #cbd5e8;
  font-size: 22px; line-height: 1; cursor: pointer;
}
.cc-close:hover { color: #fff; }
@media (max-width: 820px) {
  .cc-banner { grid-template-columns: 1fr; padding-top: 30px; }
  .cc-actions { justify-content: stretch; }
  .cc-actions .cc-btn { flex: 1 1 140px; }
  .cc-actions .cc-btn-link { flex-basis: 100%; order: 3; }
}

/* Preferences dialog */
.cc-dialog {
  width: min(640px, calc(100vw - 24px));
  max-height: calc(100svh - 24px);
  padding: 0;
  border: 1px solid rgba(255,255,255,.3);
  background: #0b0f19;
  color: #fff;
  font: 400 15px/1.55 Text,Arial,sans-serif;
}
.cc-dialog::backdrop { background: rgba(3,5,10,.72); backdrop-filter: blur(4px); }
.cc-dialog-inner { position: relative; padding: clamp(24px,4vw,40px); }
.cc-dialog .cc-text { margin-bottom: 22px; }
.cc-category { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px 20px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.16); }
.cc-category h3 { margin: 0; font: 600 14px/1.3 Text,Arial,sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.cc-category p { grid-column: 1 / -1; margin: 0; color: #a9b4c8; font-size: 14px; }
.cc-always { color: #8f9cff; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.cc-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch span { position: relative; width: 50px; height: 28px; border: 1px solid rgba(255,255,255,.5); border-radius: 28px; background: #1a2030; transition: background .2s; }
.cc-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #cbd5e8; transition: transform .2s, background .2s; }
.cc-switch input:checked + span { background: var(--electric,#305bff); border-color: var(--electric,#305bff); }
.cc-switch input:checked + span::after { transform: translateX(22px); background: #fff; }
.cc-dialog .cc-actions { margin-top: 22px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); }

/* Google Maps placeholder (shown until consent) */
.map-consent {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 14px;
  padding: clamp(22px,4vw,40px);
  background: linear-gradient(135deg,#111a33,#0a0f1d);
  color: #dce6ff;
}
.map-consent[hidden] { display: none; }
.map-consent strong { font: 700 22px/1.1 Race,'Arial Narrow',Arial,sans-serif; text-transform: uppercase; color: #fff; }
.map-consent p { margin: 0; max-width: 46ch; font-size: 14px; line-height: 1.5; }
.location-map iframe[data-consent-src]:not([src]) { visibility: hidden; }

/* Legal footer on every page */
.legal-footer {
  position: relative;
  z-index: 2;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px;
  padding: 22px var(--pad,24px);
  border-top: 1px solid rgba(255,255,255,.14);
  background: #070a10;
  color: #8f9ab0;
  font: 400 12px/1.4 Text,Arial,sans-serif;
  letter-spacing: .05em;
}
.legal-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.legal-footer a, .legal-footer button { padding: 0; border: 0; background: none; color: #cbd5e8; font: inherit; letter-spacing: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.legal-footer a:hover, .legal-footer button:hover { color: #fff; }

/* Legal pages */
.legal-page { max-width: 880px; padding: clamp(40px,7vw,96px) var(--pad,24px) clamp(60px,8vw,120px); }
.legal-page h1 { margin: 18px 0 10px; font: 700 clamp(44px,7vw,86px)/.95 Race,'Arial Narrow',Arial,sans-serif; text-transform: uppercase; }
.legal-updated { margin: 0 0 42px; color: #8f9ab0; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.legal-copy h2 { margin: 46px 0 12px; font: 700 clamp(20px,2.2vw,26px)/1.15 Race,'Arial Narrow',Arial,sans-serif; text-transform: uppercase; }
.legal-copy p, .legal-copy li { color: #cbd5e8; font-size: 16px; line-height: 1.7; }
.legal-copy ul { padding-left: 20px; }
.legal-copy a { color: #fff; text-underline-offset: 4px; }
.legal-copy table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.legal-copy th, .legal-copy td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.14); text-align: left; vertical-align: top; color: #cbd5e8; }
.legal-copy th { color: #fff; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 12px; }
.legal-table-wrap { overflow-x: auto; }
.legal-copy .cc-btn { margin-top: 8px; }
html[lang="en"] .legal-copy[lang="it"], html:not([lang="en"]) .legal-copy[lang="en"] { display: none; }
/* Home: keep the legal footer clear of the fixed chapter bar, and the banner above it */
body:not(.secondary-page) .legal-footer { padding-bottom: calc(22px + 64px); }
body:not(.secondary-page) .cc-banner { bottom: calc(64px + clamp(12px,2.4vw,32px)); }
@media print { .cc-banner, .cc-dialog, .map-consent { display: none !important; } }
