/* Cookie FAB + RGPD banner + settings modal (Luxora) */

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 85;
  display: none;
  padding: 1rem max(1rem, env(safe-area-inset-right)) max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
  pointer-events: none;
}

.cookie-banner.is-open {
  display: block;
}

.cookie-banner__inner {
  pointer-events: auto;
  width: min(920px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem 1.25rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  border: 1.5px solid rgba(212, 175, 55, 0.45);
  background: linear-gradient(165deg, rgba(26, 15, 46, 0.98), rgba(8, 4, 18, 0.98));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55), 0 0 32px rgba(107, 47, 181, 0.28);
}

.cookie-banner__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #fff;
}

.cookie-banner__copy p {
  margin: 0;
  color: #d8cee8;
  font-size: 0.92rem;
  line-height: 1.5;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
}

.cookie-btn-equal {
  appearance: none;
  min-width: 7.5rem;
  min-height: 2.75rem;
  border-radius: 10px;
  padding: 0.7rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.cookie-btn-equal:focus-visible {
  outline: 2px solid var(--accent-bright, #f0d060);
  outline-offset: 3px;
}

/* Aceitar e Rejeitar com o mesmo peso visual (RGPD) */
.cookie-btn-equal--accept,
.cookie-btn-equal--reject {
  background: linear-gradient(180deg, #9b5cff, #6b2fb5);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 6px 18px rgba(107, 47, 181, 0.45);
}

.cookie-btn-equal--accept:hover,
.cookie-btn-equal--reject:hover {
  filter: brightness(1.08);
}

.cookie-fab {
  position: fixed;
  left: 1.15rem;
  bottom: 1.15rem;
  z-index: 80;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 2px solid #fff6c8;
  border-radius: 50%;
  background: linear-gradient(180deg, #ffe08a, #d4af37 55%, #b8922a);
  color: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(240, 208, 96, 0.35);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.cookie-fab:hover {
  transform: scale(1.06);
  background: linear-gradient(180deg, #fff4c4, #f0d060 50%, #d4af37);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45), 0 0 22px rgba(240, 208, 96, 0.45);
}

.cookie-fab:focus-visible {
  outline: 2px solid var(--accent-bright, #f0d060);
  outline-offset: 3px;
}

.cookie-fab.is-open {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.95);
  color: #2a2a2a;
}

.cookie-fab svg {
  width: 28px;
  height: 28px;
  display: block;
}

.cookie-fab .icon-close {
  display: none;
}

.cookie-fab.is-open .icon-cookie {
  display: none;
}

.cookie-fab.is-open .icon-close {
  display: block;
}

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.cookie-modal.is-open {
  display: flex;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 2, 12, 0.72);
  backdrop-filter: blur(6px);
}

.cookie-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(860px, 100%);
  max-height: min(86vh, 640px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(165deg, #1a0f2e 0%, #12081f 55%, #0a0514 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 40px rgba(107, 47, 181, 0.25);
  color: var(--text, #f7f1e4);
}

.cookie-modal__header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.95rem 1.1rem;
  border-bottom: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(0, 0, 0, 0.2);
}

.cookie-modal__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.cookie-modal__brand img {
  display: block;
  width: auto;
  height: 48px;
  object-fit: contain;
}

.cookie-modal__title {
  margin: 0;
  text-align: center;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  color: #fff;
}

.cookie-modal__x {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal__x:hover {
  background: rgba(232, 90, 79, 0.25);
  border-color: rgba(232, 90, 79, 0.5);
}

.cookie-modal__x svg {
  width: 16px;
  height: 16px;
}

.cookie-modal__body {
  display: grid;
  grid-template-columns: minmax(180px, 230px) 1fr;
  min-height: 0;
  overflow: hidden;
}

.cookie-modal__nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border-right: 1px solid rgba(212, 175, 55, 0.18);
  overflow: auto;
  background: rgba(0, 0, 0, 0.18);
}

.cookie-modal__nav button {
  width: 100%;
  appearance: none;
  border: 0;
  border-left: 3px solid transparent;
  background: transparent;
  color: var(--text-muted, #a89bb8);
  text-align: left;
  padding: 0.85rem 1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-modal__nav button:hover {
  color: #fff;
  background: rgba(107, 47, 181, 0.15);
}

.cookie-modal__nav button.is-active {
  color: #fff;
  border-left-color: #a855f7;
  background: rgba(107, 47, 181, 0.22);
}

.cookie-modal__panel {
  padding: 1.15rem 1.25rem 1.35rem;
  overflow: auto;
}

.cookie-modal__panel h3 {
  margin: 0 0 0.75rem;
  font-family: var(--font-display, Georgia, serif);
  font-size: 1.2rem;
  color: var(--accent-bright, #f0d060);
}

.cookie-modal__panel p {
  margin: 0 0 0.85rem;
  color: #d4c8e4;
  font-size: 0.95rem;
  line-height: 1.55;
}

.cookie-modal__panel a {
  color: #c4a0ff;
  text-decoration: underline;
}

.cookie-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: flex-end;
  padding: 0.95rem 1.1rem;
  border-top: 1px solid rgba(212, 175, 55, 0.22);
  background: rgba(0, 0, 0, 0.25);
}

.cookie-modal__footer .btn {
  min-width: 140px;
}

.cookie-btn-ghost {
  appearance: none;
  min-height: 2.75rem;
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 10px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--accent-bright, #f0d060);
}

.cookie-btn-ghost:hover {
  background: rgba(212, 175, 55, 0.1);
}

.cookie-btn-ghost:focus-visible,
.cookie-modal__nav button:focus-visible,
.cookie-modal__x:focus-visible {
  outline: 2px solid var(--accent-bright, #f0d060);
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .cookie-banner__inner {
    grid-template-columns: 1fr;
  }

  .cookie-banner__actions {
    justify-content: stretch;
  }

  .cookie-banner__actions .cookie-btn-equal,
  .cookie-banner__actions .cookie-btn-ghost {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .cookie-modal__body {
    grid-template-columns: 1fr;
  }

  .cookie-modal__nav {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    padding: 0.35rem;
    gap: 0.25rem;
  }

  .cookie-modal__nav button {
    flex: 0 0 auto;
    border-left: 0;
    border-bottom: 0;
    border-radius: 999px;
    padding: 0.55rem 0.85rem;
    white-space: nowrap;
  }

  .cookie-modal__nav button.is-active {
    border-left-color: transparent;
    background: rgba(168, 85, 247, 0.35);
  }

  .cookie-modal__footer {
    justify-content: stretch;
  }

  .cookie-modal__footer .btn,
  .cookie-btn-equal,
  .cookie-btn-ghost {
    flex: 1 1 auto;
    min-width: 0;
  }

  .cookie-fab {
    left: max(0.85rem, env(safe-area-inset-left));
    bottom: max(0.85rem, env(safe-area-inset-bottom));
  }

  .cookie-modal {
    padding: max(0.75rem, env(safe-area-inset-top)) max(0.75rem, env(safe-area-inset-right)) max(0.75rem, env(safe-area-inset-bottom)) max(0.75rem, env(safe-area-inset-left));
  }
}
