/* =================================================================
   cookies.css  —  Cookie Consent Banner + Preferences Modal
   Design tokens inherited from site :root (accent, black, white etc.)
   ================================================================= */

/* ── BANNER ─────────────────────────────────────────── */
#cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  width: min(960px, calc(100vw - 32px));
  background: #0a0a0a;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.45), 0 0 0 1px rgba(124,92,252,0.12);
  transition: transform 0.42s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  opacity: 0;
  font-family: 'Inter', sans-serif;
}
#cookie-banner.cb-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.cb-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  flex-wrap: wrap;
}

.cb-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.cb-icon {
  width: 40px;
  height: 40px;
  background: rgba(124,92,252,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.cb-icon svg {
  width: 18px;
  height: 18px;
  stroke: #a78bfa;
}

.cb-text { flex: 1; min-width: 0; }
.cb-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
  letter-spacing: -0.1px;
}
.cb-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
  margin: 0;
}
.cb-link {
  color: #a78bfa;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.25s;
}
.cb-link:hover { color: #ffffff; }

.cb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.cb-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.825rem;
  font-weight: 600;
  border: none;
  border-radius: 100px;
  padding: 11px 22px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.3s ease;
  letter-spacing: -0.1px;
}
.cb-manage {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.1);
}
.cb-manage:hover {
  background: rgba(255,255,255,0.12);
  color: #ffffff;
  border-color: rgba(255,255,255,0.2);
}
.cb-accept {
  background: #7C5CFC;
  color: #ffffff;
}
.cb-accept:hover {
  background: #6d4ff0;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(124,92,252,0.4);
}

/* ── PREFERENCES MODAL ──────────────────────────────── */
#cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  opacity: 0;
  transition: opacity 0.3s ease;
}
#cookie-modal.cm-visible { opacity: 1; }

.cm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
}

.cm-panel {
  position: relative;
  z-index: 1;
  background: #111111;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  width: min(520px, calc(100vw - 32px));
  box-shadow: 0 40px 120px rgba(0,0,0,0.6);
  transform: translateY(16px) scale(0.97);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
#cookie-modal.cm-visible .cm-panel {
  transform: translateY(0) scale(1);
}

.cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cm-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
}
.cm-close {
  width: 32px; height: 32px;
  background: rgba(255,255,255,0.06);
  border: none;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s;
}
.cm-close:hover { background: rgba(255,255,255,0.12); }
.cm-close svg { width: 14px; height: 14px; stroke: rgba(255,255,255,0.6); }

.cm-body {
  padding: 8px 0;
}

.cm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.2s;
}
.cm-row:last-child { border-bottom: none; }
.cm-row:hover { background: rgba(255,255,255,0.02); }

.cm-row-info { flex: 1; min-width: 0; }
.cm-row-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}
.cm-row-desc {
  font-size: 0.775rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.55;
}

/* Always-on locked badge */
.cm-toggle--locked .cm-toggle-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #22c55e;
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

/* Toggle switch */
.cm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.cm-switch input { opacity: 0; width: 0; height: 0; }
.cm-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 100px;
  transition: background 0.3s;
  border: 1px solid rgba(255,255,255,0.1);
}
.cm-slider::before {
  content: '';
  position: absolute;
  left: 3px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background: rgba(255,255,255,0.4);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cm-switch input:checked + .cm-slider {
  background: #7C5CFC;
  border-color: #7C5CFC;
}
.cm-switch input:checked + .cm-slider::before {
  left: calc(100% - 19px);
  background: #ffffff;
}
.cm-switch:focus-within .cm-slider {
  box-shadow: 0 0 0 3px rgba(124,92,252,0.35);
}

.cm-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 28px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 640px) {
  .cb-inner { flex-direction: column; align-items: flex-start; padding: 20px 20px; }
  .cb-actions { width: 100%; }
  .cb-btn { flex: 1; text-align: center; }
  .cm-panel { border-radius: 16px; }
  .cm-header, .cm-row, .cm-footer { padding-left: 20px; padding-right: 20px; }
}
