/*! Zypheral — cookie consent UI.
    Self-contained and namespaced under .zyc-*, so it can drop into the marketing
    site and the dashboard without colliding with either one's stylesheet. Uses
    its own colours rather than either site's tokens for the same reason. */

.zyc-banner {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 2147483000;
  background: #14130f; color: #ebe7df;
  border-top: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 -8px 32px rgba(0,0,0,.28);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  animation: zyc-up .28s cubic-bezier(.2,.8,.3,1);
}
@keyframes zyc-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .zyc-banner { animation: none; } }

.zyc-banner-in {
  max-width: 1120px; margin: 0 auto; padding: 16px 22px;
  display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.zyc-text { flex: 1 1 380px; font-size: 13.2px; line-height: 1.6; color: #c9c4ba; }
.zyc-text strong { color: #fff; font-weight: 600; }
.zyc-text a, .zyc-note a { color: #6ee7b7; }
.zyc-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-inline-start: auto; }

.zyc-btn {
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  padding: 9px 17px; border-radius: 9px; border: 1px solid transparent;
  transition: background .14s, border-color .14s;
}
.zyc-primary { background: #10b981; color: #05130d; }
.zyc-primary:hover { background: #34d399; }
.zyc-ghost { background: transparent; color: #d7d2c8; border-color: rgba(255,255,255,.26); }
.zyc-ghost:hover { background: rgba(255,255,255,.09); }
.zyc-btn:focus-visible { outline: 2px solid #6ee7b7; outline-offset: 2px; }

/* ---- preferences dialog ---- */
.zyc-scrim {
  position: fixed; inset: 0; z-index: 2147483001;
  background: rgba(8,8,6,.62); backdrop-filter: blur(3px);
  display: grid; place-items: center; padding: 20px;
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.zyc-modal {
  width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  background: #1b1a15; color: #ebe7df;
  border: 1px solid rgba(255,255,255,.13); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,.5);
}
.zyc-modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 17px 20px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.zyc-modal-head h2 { margin: 0; font-size: 16px; font-weight: 650; color: #fff;
  font-family: "Sora", system-ui, sans-serif; }
.zyc-x { background: none; border: 0; color: #a8a29a; font-size: 24px; line-height: 1;
  cursor: pointer; padding: 0 4px; }
.zyc-x:hover { color: #fff; }

.zyc-modal-body { padding: 6px 20px 18px; }
.zyc-row {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,.08);
}
.zyc-row-t { font-size: 13.5px; font-weight: 650; color: #fff; margin-bottom: 4px; }
.zyc-row-d { font-size: 12.5px; line-height: 1.6; color: #a8a29a; }
.zyc-always { font-size: 11.5px; color: #6ee7b7; font-weight: 600; white-space: nowrap;
  background: rgba(16,185,129,.13); padding: 4px 9px; border-radius: 99px; }
.zyc-note { font-size: 12.5px; color: #a8a29a; line-height: 1.6; margin: 14px 0 0; }

.zyc-modal-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 15px 20px; border-top: 1px solid rgba(255,255,255,.1); flex-wrap: wrap;
}

/* toggle */
.zyc-switch { position: relative; display: inline-block; width: 42px; height: 24px;
  flex-shrink: 0; cursor: pointer; }
.zyc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.zyc-slider { position: absolute; inset: 0; border-radius: 99px; background: rgba(255,255,255,.16);
  transition: background .16s; pointer-events: none; }
.zyc-slider::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .16s; }
.zyc-switch input:checked + .zyc-slider { background: #10b981; }
.zyc-switch input:checked + .zyc-slider::after { transform: translateX(18px); }
.zyc-switch input:focus-visible + .zyc-slider { outline: 2px solid #6ee7b7; outline-offset: 2px; }
[dir="rtl"] .zyc-switch input:checked + .zyc-slider::after { transform: translateX(-18px); }

.zyc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 620px) {
  .zyc-banner-in { padding: 14px 16px; gap: 14px; }
  .zyc-actions { margin-inline-start: 0; width: 100%; }
  .zyc-actions .zyc-btn { flex: 1 1 auto; }
}

/* Status line under the analytics description — says what is happening right
   now ("on by default" / "off unless you turn it on"), which is not the same
   question as what the category is. */
.zyc-row-status { margin-top: 6px; color: #c9c4ba; }

/* RTL: the banner and dialog carry dir="rtl" when the interface is Arabic, so
   the logical properties above flip on their own. Only the icon-ish bits that
   are visually directional need saying twice. */
[dir="rtl"] .zyc-banner-in,
[dir="rtl"] .zyc-modal-head,
[dir="rtl"] .zyc-modal-foot,
[dir="rtl"] .zyc-row { text-align: right; }
