/* ==========================================================================
   Cookie consent — a minimal bottom bar + a small settings sheet. Buttons reuse
   the site's own .btn / .btn--cta / .btn--outline so they match exactly (small
   8px radius, brand gradient, NO transparent border, no orange outline). This
   file only lays out the bar/sheet; the button look comes from header.css.
   ========================================================================== */
.rm-cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 1200;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--color-surface-translucent);
  backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.5);
  transition: transform 450ms var(--ease-standard), opacity 350ms var(--ease-standard);
}
.rm-cookie[hidden] { display: none; }
.rm-cookie.is-hiding { transform: translateY(160%); opacity: 0; pointer-events: none; }

.rm-cookie__txt {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--color-text-muted);
}
.rm-cookie__txt a {
  color: var(--color-magenta);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.rm-cookie__txt a:hover { text-decoration: underline; }

.rm-cookie__act { display: flex; align-items: center; gap: 8px; flex: none; }
.rm-cookie__link {
  background: none;
  border: 0;
  color: var(--color-text-faint);
  font: 600 12.5px var(--font-body);
  cursor: pointer;
  padding: 8px 6px;
  white-space: nowrap;
}
.rm-cookie__link:hover { color: var(--color-text); }

/* Compact size for the two real buttons (keep the site's look, smaller footprint). */
.rm-cookie .btn { height: auto; padding: 9px 16px; font-size: 12.5px; }

@media (max-width: 560px) {
  .rm-cookie { flex-direction: column; align-items: stretch; gap: 12px; padding: 16px; }
  .rm-cookie__act { width: 100%; }
  .rm-cookie__act .btn { flex: 1; }
  .rm-cookie__link { order: -1; text-align: left; padding-left: 0; }
}

/* Reopen path: a quiet "Cookie settings" link in the footer legal row (so the
   choice can be changed anytime, per GDPR) — styled to match the legal links. */
.footer__legal-link--btn {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
}

/* Settings sheet. */
.rm-cc-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(2, 2, 4, 0.6);
  backdrop-filter: blur(3px);
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
}
.rm-cc-overlay.is-open { display: flex; }
@media (min-width: 560px) { .rm-cc-overlay { align-items: center; } }

.rm-cc-sheet {
  width: 100%;
  max-width: 440px;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.rm-cc-sheet__h { padding: 18px 20px 4px; }
.rm-cc-sheet__h h3 { font-family: var(--font-heading); font-weight: 600; font-size: 15px; margin: 0; }
.rm-cc-sheet__b { padding: 6px 20px; }

.rm-cc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}
.rm-cc-row:last-child { border-bottom: 0; }
.rm-cc-row__t { flex: 1; }
.rm-cc-row__t b { display: block; font-size: 13.5px; font-weight: 600; color: var(--color-text); }
.rm-cc-row__t span { font-size: 12px; color: var(--color-text-muted); }
.rm-cc-row__lock { font-size: 11px; color: var(--color-text-faint); font-weight: 600; white-space: nowrap; }

.rm-cc-sw { position: relative; width: 40px; height: 24px; flex: none; }
.rm-cc-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.rm-cc-tr {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  transition: 220ms var(--ease-standard);
}
.rm-cc-tr::after {
  content: "";
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #e9e4da;
  transition: 220ms var(--ease-standard);
}
.rm-cc-sw input:checked + .rm-cc-tr { background: var(--gradient-brand-btn); border-color: transparent; }
.rm-cc-sw input:checked + .rm-cc-tr::after { transform: translateX(16px); background: #fff; }
.rm-cc-sw input:disabled + .rm-cc-tr { opacity: 0.65; }

.rm-cc-sheet__f {
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
  display: flex; gap: 8px; justify-content: flex-end;
}

@media (prefers-reduced-motion: reduce) {
  .rm-cookie, .rm-cc-tr, .rm-cc-tr::after { transition: none; }
}
