/* ============================================================
   VIZAPP — cookies.css
   Cookie consent banner, modal, floating tab
   ============================================================ */

/* ============================================================
   Cookie Banner
   ============================================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9000;
  background: rgba(8, 8, 16, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;

  /* Hidden by default */
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

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

.cookie-banner.is-hidden {
  transform: translateY(100%);
  pointer-events: none;
}

.cookie-banner__text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ============================================================
   Cookie Overlay
   ============================================================ */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.cookie-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ============================================================
   Cookie Modal
   ============================================================ */
.cookie-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  z-index: 9002;
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
  padding: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-modal.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  pointer-events: auto;
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.cookie-modal__title {
  font-family: 'Inter Tight', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.cookie-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.cookie-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.cookie-modal__body {
  padding: 8px 0;
}

.cookie-modal__footer {
  padding: 16px 24px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

.cookie-modal__privacy-link {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  transition: color 0.15s ease;
}

.cookie-modal__privacy-link:hover {
  color: rgba(255, 255, 255, 0.7);
}

/* ============================================================
   Cookie Row (in modal)
   ============================================================ */
.cookie-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cookie-row:last-child {
  border-bottom: none;
}

.cookie-row__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.cookie-row__name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.cookie-row__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.4;
}

/* ============================================================
   Toggle Switch
   ============================================================ */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s ease, border-color 0.2s ease;
  display: flex;
  align-items: center;
  padding: 0;
}

.cookie-toggle[aria-checked="true"] {
  background: #7c3aed;
  border-color: #7c3aed;
}

.cookie-toggle__knob {
  position: absolute;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
  pointer-events: none;
}

.cookie-toggle[aria-checked="true"] .cookie-toggle__knob {
  transform: translateX(20px);
}

.cookie-toggle--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

.cookie-toggle--disabled .cookie-toggle__knob {
  transform: translateX(20px);
}

/* ============================================================
   Save button full width
   ============================================================ */
.cookie-btn-save {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   Floating Cookie Tab (FAB)
   ============================================================ */
.cookie-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 8999;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.cookie-fab:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  transform: scale(1.05);
}

/* ============================================================
   Mobile
   ============================================================ */
@media (max-width: 600px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 20px 20px 28px;
    gap: 16px;
  }

  .cookie-banner__actions {
    flex-direction: column;
    width: 100%;
  }

  .cookie-banner__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .cookie-modal {
    max-width: calc(100vw - 32px);
    margin: 0 16px;
    left: 0;
    right: 0;
    transform: translate(0, -48%) scale(0.96);
    top: 50%;
  }

  .cookie-modal.is-visible {
    transform: translate(0, -50%) scale(1);
  }

  .cookie-fab {
    bottom: 16px;
    right: 16px;
  }
}
