/* ═══════════════════════════════════════════════════
   Cookie Consent Pro – Stylesheet
   ═══════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* ── Variables ──────────────────────────────────── */
:root {
  --ccp-accent:      #6C63FF;
  --ccp-accent-glow: rgba(108,99,255,.35);
  --ccp-radius:      20px;
  --ccp-duration:    .45s;
  --ccp-ease:        cubic-bezier(.16,1,.3,1);
}

/* ── Overlay (only for center position) ─────────── */
#ccp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99998;
  opacity: 0;
  transition: opacity var(--ccp-duration) ease;
  pointer-events: none;
}
#ccp-overlay.ccp-visible { opacity: 1; pointer-events: all; }

/* ── Banner wrapper ─────────────────────────────── */
#ccp-banner {
  position: fixed;
  z-index: 99999;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  max-width: 520px;
  width: calc(100% - 32px);
  border-radius: var(--ccp-radius);
  padding: 28px 30px 24px;
  box-sizing: border-box;
  transition:
    transform var(--ccp-duration) var(--ccp-ease),
    opacity   var(--ccp-duration) ease;
  will-change: transform, opacity;
}

/* ── Position variants ──────────────────────────── */
#ccp-banner.pos-bottom-center {
  bottom: 20px; left: 50%; transform: translateX(-50%) translateY(120%);
}
#ccp-banner.pos-bottom-center.ccp-visible {
  transform: translateX(-50%) translateY(0);
}
#ccp-banner.pos-bottom-left {
  bottom: 20px; left: 20px; transform: translateY(120%);
}
#ccp-banner.pos-bottom-left.ccp-visible  { transform: translateY(0); }
#ccp-banner.pos-bottom-right {
  bottom: 20px; right: 20px; transform: translateY(120%);
}
#ccp-banner.pos-bottom-right.ccp-visible { transform: translateY(0); }
#ccp-banner.pos-center {
  top: 50%; left: 50%;
  transform: translate(-50%,-50%) scale(.88);
  opacity: 0;
  max-width: 540px;
}
#ccp-banner.pos-center.ccp-visible {
  transform: translate(-50%,-50%) scale(1);
  opacity: 1;
}

/* ── DARK theme ─────────────────────────────────── */
#ccp-banner.theme-dark {
  background: linear-gradient(145deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border: 1px solid rgba(255,255,255,.1);
  box-shadow:
    0 0 0 1px rgba(108,99,255,.2),
    0 24px 64px rgba(0,0,0,.6),
    0 0 120px rgba(108,99,255,.08);
  color: #e8e8f0;
}

/* ── LIGHT theme ────────────────────────────────── */
#ccp-banner.theme-light {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
  color: #1a1a2e;
}

/* ── GLASS theme ────────────────────────────────── */
#ccp-banner.theme-glass {
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(24px) saturate(1.8);
  -webkit-backdrop-filter: blur(24px) saturate(1.8);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  color: #ffffff;
}

/* ── Cookie icon ────────────────────────────────── */
.ccp-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 10px;
  animation: ccp-wobble 3s ease-in-out infinite;
}
@keyframes ccp-wobble {
  0%,100% { transform: rotate(-5deg) scale(1); }
  50%      { transform: rotate(8deg) scale(1.1); }
}

/* ── Title ──────────────────────────────────────── */
.ccp-title {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px;
  letter-spacing: -.3px;
}
.theme-dark  .ccp-title { color: #ffffff; }
.theme-light .ccp-title { color: #1a1a2e; }
.theme-glass .ccp-title { color: #ffffff; }

/* ── Description ────────────────────────────────── */
.ccp-desc {
  font-weight: 300;
  margin: 0 0 18px;
  font-size: 14px;
  opacity: .85;
}

/* ── Privacy link ───────────────────────────────── */
.ccp-privacy-link {
  color: var(--ccp-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
  font-weight: 500;
}
.ccp-privacy-link:hover { border-color: var(--ccp-accent); }

/* ── Toggle section ─────────────────────────────── */
.ccp-categories {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.ccp-category {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  transition: background .2s;
}
.theme-dark  .ccp-category { background: rgba(255,255,255,.05); }
.theme-light .ccp-category { background: rgba(0,0,0,.04); }
.theme-glass .ccp-category { background: rgba(255,255,255,.08); }

.ccp-category:hover {
  background: rgba(108,99,255,.1);
}

.ccp-cat-info { display: flex; flex-direction: column; }
.ccp-cat-name {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .2px;
}
.ccp-cat-desc {
  font-size: 11.5px;
  opacity: .6;
  margin-top: 1px;
}

/* ── Toggle switch ──────────────────────────────── */
.ccp-toggle {
  position: relative;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}
.ccp-toggle input { opacity: 0; width: 0; height: 0; }
.ccp-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.2);
  border-radius: 24px;
  transition: background .25s;
}
.ccp-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform .25s var(--ccp-ease);
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
}
.ccp-toggle input:checked + .ccp-slider { background: var(--ccp-accent); }
.ccp-toggle input:checked + .ccp-slider::before { transform: translateX(18px); }
.ccp-toggle input:disabled + .ccp-slider { opacity: .5; cursor: not-allowed; }

/* ── Buttons ────────────────────────────────────── */
.ccp-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ccp-btn {
  flex: 1;
  min-width: 120px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .18s var(--ccp-ease), box-shadow .18s, background .2s;
  letter-spacing: .2px;
}
.ccp-btn:hover { transform: translateY(-2px); }
.ccp-btn:active { transform: translateY(0); }

/* Accept all – accent filled */
.ccp-btn-accept-all {
  background: var(--ccp-accent);
  color: #fff;
  box-shadow: 0 4px 20px var(--ccp-accent-glow);
}
.ccp-btn-accept-all:hover {
  box-shadow: 0 6px 28px var(--ccp-accent-glow);
  filter: brightness(1.1);
}

/* Save selection – subtle */
.ccp-btn-accept-sel {
  background: rgba(108,99,255,.18);
  color: var(--ccp-accent);
}
.theme-light .ccp-btn-accept-sel {
  background: rgba(108,99,255,.1);
}
.ccp-btn-accept-sel:hover { background: rgba(108,99,255,.28); }

/* Decline – ghost */
.ccp-btn-decline {
  flex: 0 0 auto;
  padding: 12px 16px;
  font-size: 12px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: inherit;
  opacity: .7;
  letter-spacing: 0;
}
.theme-light .ccp-btn-decline { border-color: rgba(0,0,0,.15); }
.ccp-btn-decline:hover { opacity: 1; background: rgba(255,255,255,.06); }

/* ── Glow dots decoration ───────────────────────── */
.ccp-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
}
.ccp-glow-1 {
  width: 200px; height: 200px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(108,99,255,.25) 0%, transparent 70%);
}
.ccp-glow-2 {
  width: 140px; height: 140px;
  bottom: -40px; left: 20px;
  background: radial-gradient(circle, rgba(99,179,255,.2) 0%, transparent 70%);
}

/* ── Consent badge (after close) ────────────────── */
#ccp-badge {
  position: fixed;
  bottom: 16px;
  left: 16px;
  z-index: 99990;
  background: var(--ccp-accent);
  color: #fff;
  border-radius: 50%;
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 16px var(--ccp-accent-glow);
  transition: transform .2s var(--ccp-ease), opacity .3s;
  opacity: 0;
  transform: scale(0);
}
#ccp-badge.ccp-visible { opacity: 1; transform: scale(1); }
#ccp-badge:hover { transform: scale(1.15); }
#ccp-badge title { display: none; }

/* ── Responsive ─────────────────────────────────── */
@media (max-width: 500px) {
  #ccp-banner { width: calc(100% - 24px); padding: 22px 20px 18px; }
  .ccp-buttons { flex-direction: column; }
  .ccp-btn-decline { min-width: auto; }
}
