/* ══════════════════════════════════════
   ClientBuilt.nl — Cookie Banner
   Voeg toe aan elke pagina via:
   <link rel="stylesheet" href="cookie.css">
══════════════════════════════════════ */

/* ── Overlay backdrop ── */
#cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
#cookie-overlay.show {
  opacity: 1;
  pointer-events: all;
}

/* ── Banner container ── */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
#cookie-banner.show {
  transform: translateY(0);
}

/* ── Inner card ── */
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto 0;
  background: #0e1c33;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 32px 40px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  box-shadow: 0 -12px 48px rgba(0, 0, 0, 0.35);
}

/* ── Icon ── */
.cookie-icon {
  width: 52px;
  height: 52px;
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

/* ── Text block ── */
.cookie-text {}
.cookie-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.cookie-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  max-width: 640px;
}
.cookie-desc a {
  color: #2563EB;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}
.cookie-desc a:hover { color: #7BA7F7; }

/* ── Buttons ── */
.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-width: 180px;
}
.cookie-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: 50px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}
.cookie-btn-accept {
  background: #2563EB;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}
.cookie-btn-accept:hover {
  background: #1d4fd8;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.cookie-btn-decline {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.cookie-btn-decline:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ── Settings panel (detail view) ── */
.cookie-settings {
  display: none;
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding-top: 24px;
  margin-top: 4px;
}
.cookie-settings.open { display: block; }

.cookie-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.cookie-category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.cookie-category-info { flex: 1; }
.cookie-category-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.cookie-category-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
  flex-shrink: 0;
  position: relative;
  width: 40px;
  height: 22px;
  margin-top: 2px;
}
.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.cookie-toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background 0.25s;
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: #2563EB;
}
.cookie-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(18px);
}
.cookie-toggle input:disabled + .cookie-toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Settings footer row */
.cookie-settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.cookie-settings-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #2563EB;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.cookie-settings-link:hover { color: #7BA7F7; }

/* ── Mobile responsive ── */
@media (max-width: 768px) {
  .cookie-inner {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
    border-radius: 16px 16px 0 0;
  }
  .cookie-icon { display: none; }
  .cookie-actions {
    flex-direction: row;
    min-width: unset;
    width: 100%;
  }
  .cookie-btn { flex: 1; }
  .cookie-settings-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .cookie-actions { flex-direction: column; }
  .cookie-btn { width: 100%; }
}
