/* ============================================================
   Digital Growth – Cookie Consent (Silktide-style, DG design)
   ============================================================ */

/* --- Overlay (banner: none / modal: subtle dim, no blur) --- */
#dg-consent-banner .dg-cc-overlay {
  display: none;
}
#dg-consent-modal .dg-cc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2147483000;
}
#dg-consent-modal.dg-cc-visible .dg-cc-overlay {
  opacity: 1;
  pointer-events: auto;
}

/* Banner should not block interaction */
#dg-consent-banner {
  pointer-events: none;
}

/* --- Banner (initial, centered, compact) --- */
#dg-consent-banner {
  position: fixed;
  inset: 0;
  z-index: 2147483001;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}
#dg-consent-banner .dg-cc-card {
  position: relative;
  z-index: 2147483003;
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  background: #0a0a0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(168, 85, 247, 0.08) inset;
  padding: 24px;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
#dg-consent-banner.dg-cc-visible .dg-cc-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}

#dg-consent-banner .dg-cc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
#dg-consent-banner .dg-cc-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #a855f7;
}
#dg-consent-banner .dg-cc-cookie-svg {
  width: 20px;
  height: 20px;
}
#dg-consent-banner .dg-cc-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  color: #fff;
  letter-spacing: -0.01em;
}
#dg-consent-banner .dg-cc-text {
  font-size: 13px;
  line-height: 1.55;
  color: #9ca3af;
  margin: 0 0 18px;
}
#dg-consent-banner .dg-cc-text a {
  color: #c084fc;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#dg-consent-banner .dg-cc-text a:hover { color: #fff; }

#dg-consent-banner .dg-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Preferences Modal --- */
#dg-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  pointer-events: none;
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
}
#dg-consent-modal .dg-cc-modal-card {
  position: relative;
  z-index: 2147483003;
  pointer-events: auto;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #0a0a0e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(168, 85, 247, 0.08) inset;
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
}
#dg-consent-modal.dg-cc-visible .dg-cc-modal-card {
  transform: translateY(0) scale(1);
  opacity: 1;
}
#dg-consent-modal .dg-cc-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #9ca3af;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
#dg-consent-modal .dg-cc-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
#dg-consent-modal .dg-cc-close svg { width: 16px; height: 16px; }

#dg-consent-modal .dg-cc-modal-body { padding: 28px 28px 24px; }
#dg-consent-modal .dg-cc-modal-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #fff;
  letter-spacing: -0.01em;
  padding-right: 40px;
}
#dg-consent-modal .dg-cc-modal-text {
  font-size: 13px;
  line-height: 1.55;
  color: #9ca3af;
  margin: 0 0 20px;
}

#dg-consent-modal .dg-cc-pref-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
#dg-consent-modal .dg-cc-pref-item {
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
}
#dg-consent-modal .dg-cc-pref-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
#dg-consent-modal .dg-cc-pref-head strong {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
}
#dg-consent-modal .dg-cc-pref-desc {
  font-size: 12px;
  line-height: 1.55;
  color: #9ca3af;
  margin: 0;
}

/* --- Toggle Switch --- */
.dg-cc-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.dg-cc-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.dg-cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  transition: background 0.25s, border-color 0.25s;
}
.dg-cc-slider::before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s;
}
.dg-cc-switch input:checked + .dg-cc-slider {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  border-color: transparent;
}
.dg-cc-switch input:checked + .dg-cc-slider::before {
  transform: translate(16px, -50%);
}
.dg-cc-switch-locked .dg-cc-slider {
  background: rgba(168, 85, 247, 0.3);
  border-color: rgba(168, 85, 247, 0.4);
  cursor: not-allowed;
}
.dg-cc-switch-locked .dg-cc-slider::before {
  transform: translate(16px, -50%);
  background: #c084fc;
}

#dg-consent-modal .dg-cc-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* --- Buttons (shared) --- */
.dg-cc-btn {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 18px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.01em;
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
}
.dg-cc-btn-primary {
  background: linear-gradient(135deg, #a855f7, #c084fc);
  color: #0a0a0a;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.35);
}
.dg-cc-btn-primary:hover {
  box-shadow: 0 6px 24px rgba(168, 85, 247, 0.5);
  transform: translateY(-1px);
}
.dg-cc-btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}
.dg-cc-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

/* --- Persistent Cookie Icon (bottom-left) --- */
#dg-cc-icon {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 2147482999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0a0a0e;
  border: 1px solid rgba(168, 85, 247, 0.25);
  color: #a855f7;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(168, 85, 247, 0.1) inset;
  transition: all 0.25s;
  padding: 0;
}
#dg-cc-icon:hover {
  transform: scale(1.08);
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 12px 32px rgba(168, 85, 247, 0.3), 0 0 0 1px rgba(168, 85, 247, 0.2) inset;
}
#dg-cc-icon svg { width: 22px; height: 22px; }

@media (max-width: 480px) {
  #dg-consent-banner { padding: 12px; }
  #dg-consent-banner .dg-cc-card { padding: 20px; }
  #dg-consent-modal .dg-cc-modal-body { padding: 22px 20px 20px; }
  .dg-cc-btn { font-size: 12.5px; padding: 10px 14px; }
  #dg-cc-icon { bottom: 16px; left: 16px; width: 40px; height: 40px; }
  #dg-cc-icon svg { width: 20px; height: 20px; }
}
