/* ═══════════════════════════════════════════════════════════════════════════
   KP Astrology Pro — Cookie Consent styles
   Dark/gold theme — matches existing tokens in style.css (--space-navy,
   --solar-gold, --star-blue, --moon-white, --glass-border).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── First-visit banner (bottom-right, non-blocking) ─────────────────────── */
.kp-cc-banner {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9998;
  max-width: 460px;
  width: calc(100% - 2.5rem);
  background: rgba(11, 18, 36, 0.97);
  color: var(--moon-white);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 213, 79, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(20px);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.kp-cc-banner.is-visible { opacity: 1; transform: translateY(0); }

.kp-cc-banner-inner { padding: 1.1rem 1.2rem 1rem; }

.kp-cc-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--solar-gold);
  margin: 0 0 0.4rem;
  letter-spacing: 0.2px;
}
.kp-cc-desc {
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--text-dim, rgba(232, 234, 246, 0.75));
  margin: 0 0 0.9rem;
}
.kp-cc-link { color: var(--star-blue); text-decoration: underline; }
.kp-cc-link:hover { color: var(--star-cyan); }

.kp-cc-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.kp-cc-btn {
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.6rem 0.95rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}
.kp-cc-btn:focus-visible {
  outline: 2px solid var(--solar-gold);
  outline-offset: 2px;
}
.kp-cc-btn:active { transform: translateY(1px); }

.kp-cc-btn-primary {
  background: linear-gradient(135deg, var(--solar-gold), #f0b428);
  color: #0B1224;
  border-color: rgba(255, 213, 79, 0.6);
}
.kp-cc-btn-primary:hover { background: linear-gradient(135deg, #ffe082, #f5be32); }

.kp-cc-btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--moon-white);
  border-color: rgba(255, 255, 255, 0.15);
}
.kp-cc-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}

.kp-cc-btn-ghost {
  background: transparent;
  color: var(--star-blue);
  border-color: rgba(79, 195, 247, 0.35);
}
.kp-cc-btn-ghost:hover {
  background: rgba(79, 195, 247, 0.08);
  border-color: var(--star-blue);
}

/* ── Customize modal ─────────────────────────────────────────────────────── */
.kp-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.kp-cc-modal.is-visible { opacity: 1; pointer-events: auto; }

.kp-cc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 9, 15, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.kp-cc-modal-card {
  position: relative;
  width: min(560px, calc(100% - 2rem));
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0F1A30, #0B1224);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 213, 79, 0.06);
  color: var(--moon-white);
  transform: translateY(8px);
  transition: transform 0.22s ease;
}
.kp-cc-modal.is-visible .kp-cc-modal-card { transform: translateY(0); }

.kp-cc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1.1rem 1.3rem 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.kp-cc-modal-head h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--solar-gold);
  font-weight: 600;
}
.kp-cc-x {
  background: transparent;
  border: 0;
  color: var(--moon-white);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s ease;
}
.kp-cc-x:hover { background: rgba(255, 255, 255, 0.08); }
.kp-cc-x:focus-visible {
  outline: 2px solid var(--solar-gold);
  outline-offset: 2px;
}

.kp-cc-modal-body {
  padding: 1rem 1.3rem 0.6rem;
  overflow-y: auto;
}
.kp-cc-modal-intro {
  font-size: 0.86rem;
  color: var(--text-dim, rgba(232, 234, 246, 0.75));
  line-height: 1.5;
  margin: 0 0 0.8rem;
}

.kp-cc-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.kp-cc-row:first-of-type { border-top: 0; }

.kp-cc-row-text { flex: 1; min-width: 0; }
.kp-cc-row-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--moon-white);
  margin-bottom: 0.2rem;
}
.kp-cc-row-desc {
  font-size: 0.8rem;
  color: var(--text-dim, rgba(232, 234, 246, 0.7));
  line-height: 1.45;
}

/* iOS-style toggle — accessible, large hit target. */
.kp-cc-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}
.kp-cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.kp-cc-slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  transition: background 0.2s ease;
  cursor: pointer;
}
.kp-cc-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.kp-cc-switch input:checked + .kp-cc-slider {
  background: linear-gradient(135deg, var(--solar-gold), #f0b428);
}
.kp-cc-switch input:checked + .kp-cc-slider::before {
  transform: translateX(20px);
}
.kp-cc-switch input:disabled + .kp-cc-slider {
  background: rgba(255, 213, 79, 0.35);
  cursor: not-allowed;
}
.kp-cc-switch input:focus-visible + .kp-cc-slider {
  outline: 2px solid var(--solar-gold);
  outline-offset: 3px;
}

.kp-cc-modal-foot {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 0.85rem 1.3rem 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Prevent background scroll while modal is open */
body.kp-cc-modal-open { overflow: hidden; }

/* ── Mobile responsiveness ──────────────────────────────────────────────── */
@media (max-width: 600px) {
  .kp-cc-banner {
    right: 0.6rem;
    left: 0.6rem;
    bottom: 0.6rem;
    width: auto;
    max-width: none;
  }
  .kp-cc-actions { justify-content: stretch; }
  .kp-cc-actions .kp-cc-btn { flex: 1 1 30%; padding: 0.7rem 0.6rem; font-size: 0.78rem; }
  .kp-cc-modal-foot { justify-content: stretch; }
  .kp-cc-modal-foot .kp-cc-btn { flex: 1 1 30%; }
  .kp-cc-modal-head h2 { font-size: 1rem; }
}

/* Reduced motion — drop the slide/fade for users who opt out. */
@media (prefers-reduced-motion: reduce) {
  .kp-cc-banner,
  .kp-cc-modal,
  .kp-cc-modal-card,
  .kp-cc-slider,
  .kp-cc-slider::before,
  .kp-cc-btn { transition: none; }
}

/* Footer "Cookie preferences" link — match the other footer-col anchors. */
.footer-col a.kp-cc-prefs-link { cursor: pointer; }
