/* ── Consent Mode v2 / GDPR Banner ── */

.consent-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9990;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  backdrop-filter: blur(4px);
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.consent-banner {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 2rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  z-index: 9995;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.05);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(40px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.consent-header {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}

.consent-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.consent-header h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: var(--space-1);
}

.consent-header p {
  font-size: var(--text-sm);
  color: var(--color-text-2);
  line-height: 1.6;
}

.consent-header a {
  color: var(--color-primary-l);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.consent-types {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.consent-type {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-3);
  font-size: var(--text-xs);
}

.consent-type-icon {
  font-size: 1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.consent-type strong {
  display: block;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 2px;
}

.consent-type span {
  color: var(--color-text-2);
}

.consent-buttons {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.consent-buttons .btn {
  flex: 1;
  min-width: 120px;
}

/* Consent form (customize) */
.consent-form {
  position: fixed;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 2rem));
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  z-index: 9995;
  box-shadow: 0 24px 64px rgba(0,0,0,0.7);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  max-height: 90vh;
  overflow-y: auto;
}

.consent-form h2 {
  font-size: var(--text-xl);
  font-weight: 800;
  margin-bottom: var(--space-6);
}

.consent-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: var(--space-3);
  gap: var(--space-4);
}

.consent-option-info {
  flex: 1;
}

.consent-option-info strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 2px;
}

.consent-option-info span {
  font-size: var(--text-xs);
  color: var(--color-text-2);
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--color-border);
  border-radius: var(--radius-full);
  transition: background var(--transition);
  cursor: pointer;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--color-primary);
}

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

.toggle-switch input:disabled + .toggle-slider {
  background: rgba(0,212,170,0.4);
  cursor: not-allowed;
}

.toggle-switch input:disabled:checked + .toggle-slider {
  background: rgba(0,212,170,0.6);
}

/* Consent widget (floating cookie settings button) */
.consent-widget {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9000;
}

.consent-widget-btn {
  width: 44px;
  height: 44px;
  background: var(--color-surface);
  border: 1px solid var(--color-border-2);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: var(--shadow);
  color: var(--color-text-2);
}

.consent-widget-btn:hover {
  background: var(--color-surface-2);
  border-color: var(--color-primary);
  color: var(--color-primary-l);
  transform: scale(1.05);
  box-shadow: var(--shadow-glow);
}

@media (max-width: 640px) {
  .consent-banner,
  .consent-form {
    bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    width: 100%;
  }

  .consent-types { grid-template-columns: 1fr; }
  .consent-buttons { flex-direction: column; }
  .consent-buttons .btn { flex: none; }
}
