/*
 * ROOT VPN , cookie consent banner + preferences modal.
 * Self-contained. Daylight light scheme (white surfaces, #191C1F text,
 * green accent #12B87A). Does not depend on styles.css but reuses its
 * CSS custom properties when present, with hard-coded fallbacks so the
 * banner looks identical on every generated page.
 * No em dashes anywhere (house style).
 */

.rc-root {
  --rc-text: var(--text, #191C1F);
  --rc-muted: var(--muted, #5C636B);
  --rc-line: var(--line, #E6E8EB);
  --rc-panel: var(--panel, #FFFFFF);
  --rc-tint: var(--ink-2, #F6F7F8);
  --rc-accent: var(--root-blue, #12B87A);
  --rc-accent-ink: var(--on-accent, #FFFFFF);
  --rc-radius: 16px;
  --rc-radius-sm: 10px;
  --rc-ease: var(--ease, cubic-bezier(.22,.61,.36,1));
  font-family: var(--sans, "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
  color: var(--rc-text);
  -webkit-font-smoothing: antialiased;
}

.rc-root * { box-sizing: border-box; }

/* ---- shared button styling: equal prominence for every choice ---- */
.rc-btn {
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  line-height: 1;
  padding: 12px 20px;
  min-height: 44px;
  border-radius: var(--rc-radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: transform .12s var(--rc-ease), background-color .15s, border-color .15s, box-shadow .15s;
  white-space: nowrap;
}
.rc-btn:hover { transform: translateY(-1px); }
.rc-btn:active { transform: translateY(0); }
.rc-btn:focus-visible {
  outline: 3px solid var(--rc-accent);
  outline-offset: 2px;
}

/* Accept: solid green. Reject: solid neutral of the SAME size and weight
   (PECR: reject must be as easy as accept). Manage: bordered, same size. */
.rc-btn--accept { background: var(--rc-accent); color: var(--rc-accent-ink); }
.rc-btn--accept:hover { box-shadow: 0 10px 24px rgba(10,138,87,.28); }
.rc-btn--reject { background: #23282E; color: #FFFFFF; }
.rc-btn--reject:hover { box-shadow: 0 10px 24px rgba(24,28,33,.22); }
.rc-btn--ghost {
  background: var(--rc-panel);
  color: var(--rc-text);
  border-color: var(--rc-line);
}
.rc-btn--ghost:hover { border-color: var(--rc-accent); }

/* ------------------------------- banner ------------------------------- */
.rc-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 2147483000;
  display: flex;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.rc-banner__card {
  pointer-events: auto;
  width: 100%;
  max-width: 1080px;
  background: var(--rc-panel);
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-radius);
  box-shadow: 0 18px 48px rgba(24,28,33,.16), 0 2px 8px rgba(24,28,33,.06);
  padding: 20px 22px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  animation: rc-rise .32s var(--rc-ease) both;
}
.rc-banner__text { flex: 1 1 420px; min-width: 260px; }
.rc-banner__title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.rc-banner__body {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--rc-muted);
}
.rc-banner__body a { color: var(--rc-accent); font-weight: 600; text-decoration: underline; }
.rc-actions {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
}
.rc-actions .rc-btn { flex: 1 1 auto; }

@media (max-width: 640px) {
  .rc-banner { padding: 10px; }
  .rc-banner__card { padding: 18px; gap: 14px; }
  .rc-actions { width: 100%; }
  .rc-actions .rc-btn { flex: 1 1 140px; }
}

/* ------------------------------- modal ------------------------------- */
.rc-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.rc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,20,25,.42);
  animation: rc-fade .2s var(--rc-ease) both;
}
.rc-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: min(88vh, 720px);
  overflow-y: auto;
  background: var(--rc-panel);
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-radius);
  box-shadow: 0 24px 64px rgba(24,28,33,.28);
  padding: 26px 26px 22px;
  animation: rc-rise .28s var(--rc-ease) both;
}
.rc-modal__title {
  margin: 0 0 6px;
  font-family: var(--display, inherit);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}
.rc-modal__intro { margin: 0 0 18px; font-size: 13.5px; line-height: 1.55; color: var(--rc-muted); }
.rc-modal__intro a { color: var(--rc-accent); font-weight: 600; }
.rc-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  border: 1px solid var(--rc-line);
  background: var(--rc-panel);
  color: var(--rc-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.rc-close:hover { color: var(--rc-text); border-color: var(--rc-accent); }
.rc-close:focus-visible { outline: 3px solid var(--rc-accent); outline-offset: 2px; }

.rc-cat {
  border: 1px solid var(--rc-line);
  border-radius: var(--rc-radius-sm);
  padding: 15px 16px;
  margin: 0 0 12px;
  background: var(--rc-tint);
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}
.rc-cat__name { margin: 0 0 3px; font-size: 14.5px; font-weight: 700; }
.rc-cat__desc { margin: 0; font-size: 12.8px; line-height: 1.5; color: var(--rc-muted); }
.rc-cat__always {
  font-size: 12px;
  font-weight: 700;
  color: var(--rc-accent);
  white-space: nowrap;
  padding-top: 3px;
}

/* accessible toggle switch (built on a real checkbox) */
.rc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 27px; }
.rc-switch input {
  position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.rc-switch__track {
  position: absolute; inset: 0;
  background: #C7CDD4;
  border-radius: 999px;
  transition: background-color .18s var(--rc-ease);
  pointer-events: none;
}
.rc-switch__track::after {
  content: "";
  position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.28);
  transition: transform .18s var(--rc-ease);
}
.rc-switch input:checked + .rc-switch__track { background: var(--rc-accent); }
.rc-switch input:checked + .rc-switch__track::after { transform: translateX(19px); }
.rc-switch input:focus-visible + .rc-switch__track { outline: 3px solid var(--rc-accent); outline-offset: 2px; }
.rc-switch input:disabled { cursor: not-allowed; }
.rc-switch input:disabled + .rc-switch__track { background: var(--rc-accent); opacity: .55; }

.rc-modal__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.rc-modal__actions .rc-btn { flex: 1 1 150px; }

/* ------------------------------- footer link ------------------------------- */
.rc-settings-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}
.rc-settings-link:hover { color: var(--rc-accent, #12B87A); }
.rc-settings-link:focus-visible { outline: 2px solid var(--rc-accent, #12B87A); outline-offset: 2px; }

/* ------------------------------- motion ------------------------------- */
@keyframes rc-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes rc-fade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .rc-banner__card, .rc-modal__dialog, .rc-modal__backdrop { animation: none; }
  .rc-btn, .rc-switch__track, .rc-switch__track::after { transition: none; }
  .rc-btn:hover { transform: none; }
}
