/* Cookie Consent — GDPR / 152-FZ */
/* Navin Auto Partner — dark glassmorphism theme */

.cc-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.cc-wrapper.cc-show {
  transform: translateY(0);
}

/* ── Banner ─────────────────────────────────────────── */

.cc-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 32px;
  background: rgba(12, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(139, 92, 246, 0.2);
}

.cc-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.cc-text {
  flex: 1;
  min-width: 0;
}

.cc-title {
  font-size: 1rem;
  font-weight: 700;
  color: #f0f0f4;
  margin-bottom: 4px;
}

.cc-desc {
  font-size: 0.85rem;
  color: #9aa0b0;
  line-height: 1.45;
}

.cc-link {
  color: #8b5cf6;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-link:hover {
  color: #a78bfa;
}

/* ── Buttons ────────────────────────────────────────── */

.cc-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cc-btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  white-space: nowrap;
  font-family: inherit;
}

.cc-btn-accept {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.cc-btn-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.5);
}

.cc-btn-necessary {
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.4);
  color: #8b5cf6;
}

.cc-btn-necessary:hover {
  border-color: rgba(139, 92, 246, 0.7);
  background: rgba(139, 92, 246, 0.08);
}

.cc-btn-settings {
  background: none;
  border: none;
  color: #9aa0b0;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 6px 10px;
  font-family: inherit;
  transition: color 0.2s;
}

.cc-btn-settings:hover {
  color: #f0f0f4;
}

/* ── Settings Panel ─────────────────────────────────── */

.cc-settings {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(12, 12, 20, 0.98);
  padding: 0 32px;
}

.cc-settings.cc-settings-open {
  max-height: 400px;
  padding: 16px 32px 20px;
}

.cc-settings-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f0f0f4;
  margin-bottom: 12px;
}

.cc-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cc-opt:last-of-type {
  border-bottom: none;
}

.cc-opt-info {
  flex: 1;
  min-width: 0;
}

.cc-opt-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #e4e4ec;
}

.cc-opt-desc {
  font-size: 0.78rem;
  color: #6b7280;
  margin-top: 2px;
}

/* ── iOS-style Toggle ───────────────────────────────── */

.cc-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  margin-left: 16px;
}

.cc-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cc-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #333;
  border-radius: 24px;
  transition: background 0.3s;
}

.cc-slider::before {
  content: '';
  position: absolute;
  left: 3px;
  bottom: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.3s;
}

.cc-toggle input:checked + .cc-slider {
  background: #8b5cf6;
}

.cc-toggle input:checked + .cc-slider::before {
  transform: translateX(20px);
}

.cc-toggle input:disabled + .cc-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Save Button ────────────────────────────────────── */

.cc-btn-save {
  margin-top: 14px;
  padding: 10px 28px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  color: #fff;
  font-family: inherit;
  transition: all 0.25s ease;
}

.cc-btn-save:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

/* ── Mini Button (re-open) ──────────────────────────── */

.cc-mini {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(12, 12, 20, 0.9);
  border: 1px solid rgba(139, 92, 246, 0.3);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.cc-mini:hover {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.25);
  transform: scale(1.1);
}

/* ── Mobile ─────────────────────────────────────────── */

@media (max-width: 640px) {
  .cc-banner {
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
    text-align: center;
  }

  .cc-actions {
    flex-direction: column;
    width: 100%;
  }

  .cc-btn {
    width: 100%;
    text-align: center;
  }

  .cc-btn-settings {
    width: auto;
  }

  .cc-settings {
    padding-left: 20px;
    padding-right: 20px;
  }

  .cc-settings.cc-settings-open {
    padding: 16px 20px 20px;
  }
}
