/* ============================================================
   BizRatings — cookie-consent.css  ★ SSOT — GDPR Banner + Modal ★
   ------------------------------------------------------------
   Shared across ALL pages. Loaded via <link rel="stylesheet">.
   Bottom slide-in bar + centered "Manage Preferences" modal.
   Uses semantic tokens from common.css. Honors dark-mode.
   v3.13
   ============================================================ */

/* ---------- Bottom slide-in bar ---------- */
.br-cc-bar {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10000;
  max-width: 1100px;
  margin: 0 auto;
  background: var(--brand-navy);
  color: rgba(255, 255, 255, 0.92);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  font-family: 'Inter', sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  transform: translateY(140%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}
.br-cc-bar.is-open {
  transform: translateY(0);
  opacity: 1;
}
.br-cc-bar__copy {
  flex: 1 1 320px;
  min-width: 240px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}
.br-cc-bar__copy strong {
  color: #fff;
  font-weight: 700;
  display: block;
  margin-bottom: 2px;
  font-size: 14px;
}
.br-cc-bar__copy a {
  color: var(--brand-yellow);
  text-decoration: underline;
}
.br-cc-bar__copy a:hover { color: #fff; }
.br-cc-bar__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.br-cc-btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 13px;
  border-radius: 10px;
  padding: 9px 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
  line-height: 1.2;
}
.br-cc-btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.br-cc-btn--primary:hover { background: hsl(96, 66%, 40%); }
.br-cc-btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.br-cc-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}
.br-cc-btn--link {
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border-color: transparent;
  text-decoration: underline;
  padding: 9px 8px;
}
.br-cc-btn--link:hover { color: #fff; }

/* ---------- Modal (Manage Preferences) ---------- */
.br-cc-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 15, 32, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 10010;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.br-cc-modal-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}
.br-cc-modal {
  background: var(--card);
  color: var(--card-fg);
  border-radius: 16px;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Inter', sans-serif;
}
.br-cc-modal-backdrop.is-open .br-cc-modal {
  transform: translateY(0) scale(1);
}
.br-cc-modal__header {
  background: linear-gradient(135deg, hsl(213, 100%, 11%) 0%, hsl(222, 100%, 25%) 100%);
  color: #fff;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.br-cc-modal__title {
  margin: 0;
  font-family: 'Nacelle', 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.br-cc-modal__close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.br-cc-modal__close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}
.br-cc-modal__body {
  padding: 20px 24px 8px;
  overflow-y: auto;
  font-size: 14px;
  color: var(--fg);
}
.br-cc-modal__intro {
  margin: 0 0 16px;
  color: var(--muted-fg);
  line-height: 1.6;
}
.br-cc-cat {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  background: var(--bg);
}
.br-cc-cat__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.br-cc-cat__label {
  font-weight: 600;
  color: var(--fg);
  font-size: 14px;
  margin: 0;
}
.br-cc-cat__desc {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted-fg);
  line-height: 1.55;
}
.br-cc-cat__pill {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: hsla(96, 66%, 47%, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
}

/* Toggle switch */
.br-cc-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex: 0 0 auto;
}
.br-cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.br-cc-switch__slider {
  position: absolute;
  inset: 0;
  background: var(--muted);
  border-radius: 999px;
  transition: background 0.18s;
  cursor: pointer;
}
.br-cc-switch__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.br-cc-switch input:checked + .br-cc-switch__slider {
  background: var(--accent);
}
.br-cc-switch input:checked + .br-cc-switch__slider::before {
  transform: translateX(18px);
}
.br-cc-switch input:disabled + .br-cc-switch__slider {
  opacity: 0.7;
  cursor: not-allowed;
}
.br-cc-switch input:focus-visible + .br-cc-switch__slider {
  outline: 2px solid #F97316;
  outline-offset: 2px;
}

.br-cc-modal__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.br-cc-modal__footer-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.br-cc-modal__policy-link {
  font-size: 12.5px;
  color: var(--muted-fg);
}
.br-cc-modal__policy-link a {
  color: var(--brand-blue);
  text-decoration: underline;
}

/* Modal-scoped buttons (light bg) */
.br-cc-modal .br-cc-btn--ghost {
  color: var(--fg);
  border-color: var(--border);
}
.br-cc-modal .br-cc-btn--ghost:hover {
  background: var(--secondary);
  border-color: var(--muted-fg);
  color: var(--fg);
}
.br-cc-modal .br-cc-btn--link {
  color: var(--muted-fg);
}
.br-cc-modal .br-cc-btn--link:hover { color: var(--fg); }

/* ---------- Dark mode ---------- */
body.dark-mode .br-cc-bar {
  background: hsl(211, 80%, 10%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
}
body.dark-mode .br-cc-modal {
  background: var(--card);
  color: var(--card-fg);
}
body.dark-mode .br-cc-cat {
  background: hsl(211, 80%, 12%);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
  .br-cc-bar {
    left: 8px;
    right: 8px;
    bottom: 8px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
  }
  .br-cc-bar__actions {
    width: 100%;
    justify-content: flex-end;
  }
  .br-cc-btn { padding: 8px 12px; font-size: 12.5px; }
  .br-cc-modal__footer {
    flex-direction: column;
    align-items: stretch;
  }
  .br-cc-modal__footer-actions { justify-content: stretch; }
  .br-cc-modal__footer-actions .br-cc-btn { flex: 1 1 auto; text-align: center; }
}

/* ---------- Print: never show ---------- */
@media print {
  .br-cc-bar,
  .br-cc-modal-backdrop { display: none !important; }
}
