/* =============================================================
   compliance.css — cookie banner, accessibility menu, consent-gated
   map, footer legal links, and global accessibility fixes.
   Colours are plain hex on purpose: these components must stay readable
   regardless of the page theme and of the a11y contrast mode.
   ============================================================= */

/* ---------- global accessibility fixes ---------- */

/* Visible keyboard focus everywhere (dark ring shows on light backgrounds, amber on dark). */
:focus-visible {
  outline: 3px solid #ffbf00 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #0d1b2a !important;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- cookie banner ---------- */

.cc-banner {
  position: fixed;
  right: 16px;
  left: 16px;
  bottom: 16px;
  z-index: 10001;
  background: #ffffff;
  color: #1a1a2e;
  border: 1px solid #d1d5db;
  border-top: 4px solid #c9a84c;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  font-family: 'Rubik', Arial, sans-serif;
}
.cc-banner[hidden], .cc-modal[hidden], .a11y-panel[hidden] { display: none !important; }

.cc-banner-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.cc-banner-text { flex: 1; }
.cc-title,
.cc-banner p.cc-title {
  font-family: 'Rubik', Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0d1b2a;
  margin: 0 0 4px;
}
.cc-banner p, .cc-panel p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
}
.cc-banner a, .cc-panel a { color: #0b4f9c; text-decoration: underline; }

.cc-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 8px;
  font-family: 'Rubik', Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  white-space: nowrap;
}
/* "Reject all" and "Accept all" share the same style on purpose — equal prominence, no nudging. */
.cc-btn-primary { background: #0d1b2a; color: #ffffff !important; border: 2px solid #0d1b2a; }
.cc-btn-primary:hover { background: #1b2d45; border-color: #1b2d45; }
.cc-btn-secondary { background: #ffffff; color: #0d1b2a !important; border: 2px solid #0d1b2a; }
.cc-btn-secondary:hover { background: #f3f4f6; }

/* ---------- cookie preferences dialog ---------- */

html.cc-lock { overflow: hidden; }

.cc-modal { position: fixed; inset: 0; z-index: 10002; display: flex; align-items: center; justify-content: center; padding: 16px; }
.cc-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.55); }
.cc-panel {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #ffffff;
  color: #1a1a2e;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  font-family: 'Rubik', Arial, sans-serif;
}
.cc-panel-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid #e5e7eb; }
.cc-panel-head .cc-title { margin: 0; font-size: 1.25rem; }
.cc-close { background: none; border: none; font-size: 1.8rem; line-height: 1; color: #374151; cursor: pointer; width: 44px; height: 44px; }
.cc-panel-body { padding: 18px 22px; }
.cc-panel-body > p:first-child { margin-bottom: 14px; }
.cc-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #f3f4f6; }
.cc-row h3 { font-family: 'Rubik', Arial, sans-serif; font-size: 1rem; font-weight: 700; color: #0d1b2a; margin: 0 0 4px; }
.cc-row p { font-size: 0.9rem; }
.cc-more { margin-top: 12px !important; }
.cc-panel .cc-actions { padding: 16px 22px 20px; border-top: 1px solid #e5e7eb; }

.cc-switch {
  flex-shrink: 0;
  position: relative;
  width: 52px;
  height: 30px;
  margin-top: 2px;
  border-radius: 999px;
  border: 2px solid #6b7280;
  background: #e5e7eb;
  cursor: pointer;
}
.cc-switch-knob {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: right 0.2s;
}
.cc-switch[aria-checked="true"] { background: #1f7a3a; border-color: #1f7a3a; }
.cc-switch[aria-checked="true"] .cc-switch-knob { right: 24px; }
.cc-switch[disabled] { opacity: 0.6; cursor: not-allowed; }

@media (max-width: 768px) {
  .cc-banner { right: 8px; left: 8px; bottom: 8px; }
  .cc-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; }
  .cc-actions .cc-btn { flex: 1 1 auto; }
}

/* ---------- consent-gated Google Maps embed ---------- */

.consent-map { width: 100%; height: 100%; }
.consent-map iframe { width: 100%; height: 100%; border: none; display: block; }
.consent-map-placeholder {
  height: 100%;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  text-align: center;
  background: #f3f4f6;
  color: #374151;
  font-family: 'Rubik', Arial, sans-serif;
}
.consent-map-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- footer legal links ---------- */

.legal-links {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 16px 0;
  font-size: 0.9rem;
  text-align: center;
}
.legal-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; }
.legal-links a, .legal-links button {
  color: #e5e7eb;
  background: none;
  border: none;
  padding: 4px 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.legal-links a:hover, .legal-links button:hover { color: #dfc077; }

/* ---------- accessibility menu ---------- */

.a11y-panel {
  position: fixed;
  left: 30px;
  bottom: 156px;
  z-index: 10000;
  width: 300px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  background: #ffffff;
  color: #1a1a2e;
  border: 2px solid #0d1b2a;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  padding: 14px;
  font-family: Arial, 'Rubik', sans-serif;
  font-size: 15px;
}
.a11y-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.a11y-head h2 { font-family: Arial, 'Rubik', sans-serif; font-size: 17px; font-weight: 700; margin: 0; color: #0d1b2a; }
.a11y-close { background: none; border: none; font-size: 26px; line-height: 1; width: 40px; height: 40px; cursor: pointer; color: #1a1a2e; }
.a11y-text-row, .a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.a11y-text-level { margin: 6px 0 10px; font-size: 13px; color: #374151; text-align: center; }
.a11y-opt {
  min-height: 44px;
  padding: 8px;
  border: 2px solid #0d1b2a;
  border-radius: 8px;
  background: #ffffff;
  color: #0d1b2a;
  font: 600 14px Arial, 'Rubik', sans-serif;
  cursor: pointer;
}
.a11y-opt:hover { background: #f3f4f6; }
.a11y-opt[aria-pressed="true"] { background: #0d1b2a; color: #ffffff; }
.a11y-reset { width: 100%; margin-top: 8px; }
.a11y-statement { display: block; margin-top: 10px; text-align: center; color: #0b4f9c; text-decoration: underline; font-size: 14px; }

@media (max-width: 480px) {
  .a11y-panel { left: 16px; right: 16px; width: auto; bottom: 156px; }
}

/* ---------- accessibility modes (set by a11y.js on <html>) ---------- */

html.a11y-text-1 { font-size: 18px !important; }
html.a11y-text-2 { font-size: 20px !important; }
html.a11y-text-3 { font-size: 22px !important; }

html.a11y-contrast body,
html.a11y-contrast body *:not(svg):not(svg *):not(img):not(iframe) {
  background-color: #000000 !important;
  background-image: none !important;
  color: #ffffff !important;
  border-color: #ffffff !important;
  text-shadow: none !important;
}
html.a11y-contrast body a,
html.a11y-contrast body a * { color: #ffe600 !important; }
html.a11y-contrast .accessibility-btn,
html.a11y-contrast .whatsapp-float,
html.a11y-contrast .back-to-top { border: 2px solid #ffffff !important; }
html.a11y-contrast .cc-switch[aria-checked="true"],
html.a11y-contrast .a11y-opt[aria-pressed="true"] { background-color: #ffe600 !important; color: #000000 !important; }

html.a11y-links a {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  outline: 2px dashed #ffbf00;
  outline-offset: 2px;
}

html.a11y-font body,
html.a11y-font body *:not(svg):not(svg *) { font-family: Arial, 'Rubik', sans-serif !important; }

html.a11y-spacing body *:not(svg):not(svg *) {
  line-height: 1.8 !important;
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}
html.a11y-spacing body p { margin-bottom: 2em !important; }

html.a11y-motion *,
html.a11y-motion *::before,
html.a11y-motion *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
