/* ═══════════════════════════════════════════════════════════════
   NAYKO Cookie Consent Banner - GDPR/DPDPA Compliant
   Phase 4: Trust & Compliance
   ═══════════════════════════════════════════════════════════════ */

.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  padding: 0 16px 16px;
  transform: translateY(110%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cookie-consent-banner.show {
  transform: translateY(0);
  pointer-events: auto;
}

.cookie-consent-inner {
  max-width: 520px;
  margin: 0 auto;
  background: rgba(18, 22, 30, 0.92);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 20px 22px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45),
              0 0 0 1px rgba(255, 255, 255, 0.04);
  font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif;
}

[data-theme="light"] .cookie-consent-inner {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(0, 0, 0, 0.03);
}

.cookie-consent-text {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

[data-theme="light"] .cookie-consent-text {
  color: rgba(0, 0, 0, 0.68);
}

.cookie-consent-text a {
  color: #818cf8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

[data-theme="light"] .cookie-consent-text a {
  color: #6366f1;
}

.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cookie-btn {
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.cookie-btn:focus-visible {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #818cf8, #6366f1);
  color: #fff;
}

.cookie-btn-accept:hover {
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.cookie-btn-necessary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="light"] .cookie-btn-necessary {
  background: rgba(0, 0, 0, 0.05);
  color: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.cookie-btn-necessary:hover {
  background: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .cookie-btn-necessary:hover {
  background: rgba(0, 0, 0, 0.08);
}

.cookie-btn-manage {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  padding: 9px 12px;
  font-size: 12px;
}

[data-theme="light"] .cookie-btn-manage {
  color: rgba(0, 0, 0, 0.5);
}

.cookie-btn-manage:hover {
  color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .cookie-btn-manage:hover {
  color: rgba(0, 0, 0, 0.8);
}

/* Cookie Preferences Modal */
.cookie-prefs-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.cookie-prefs-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cookie-prefs-modal {
  background: rgba(18, 22, 30, 0.96);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  max-width: 440px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-prefs-overlay.show .cookie-prefs-modal {
  transform: scale(1);
}

[data-theme="light"] .cookie-prefs-modal {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.cookie-prefs-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
  font-family: 'Outfit', sans-serif;
}

[data-theme="light"] .cookie-prefs-title {
  color: #111;
}

.cookie-prefs-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 20px;
  line-height: 1.5;
}

[data-theme="light"] .cookie-prefs-desc {
  color: rgba(0, 0, 0, 0.55);
}

.cookie-pref-group {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

[data-theme="light"] .cookie-pref-group {
  border-color: rgba(0, 0, 0, 0.06);
}

.cookie-pref-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cookie-pref-label {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

[data-theme="light"] .cookie-pref-label {
  color: rgba(0, 0, 0, 0.85);
}

.cookie-pref-sublabel {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 4px;
  line-height: 1.5;
}

[data-theme="light"] .cookie-pref-sublabel {
  color: rgba(0, 0, 0, 0.45);
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.25s;
}

.cookie-toggle input:checked + .cookie-toggle-track {
  background: #6366f1;
}

.cookie-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s;
}

.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(18px);
}

.cookie-toggle input:disabled + .cookie-toggle-track {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-toggle input:focus-visible + .cookie-toggle-track {
  outline: 2px solid #818cf8;
  outline-offset: 2px;
}

.cookie-prefs-save {
  margin-top: 20px;
  width: 100%;
}

@media (max-width: 480px) {
  .cookie-consent-inner {
    padding: 16px 18px;
    border-radius: 14px;
  }
  .cookie-consent-actions {
    flex-direction: column;
  }
  .cookie-btn {
    width: 100%;
    text-align: center;
  }
}
