/* ============================================================
   GiroMax, Consentimento de cookies (LGPD)
   Banner consent-first + modal de preferências. Vanilla, sem deps.
   Espelha a implementação do app (gx-cookie-consent / gx-consent).
   ============================================================ */

.gxc-root {
  --gxc-navy: #0E2233;
  --gxc-navy-2: #0B1A2A;
  --gxc-line: rgba(255, 255, 255, .12);
  --gxc-txt: #EAF1F5;
  --gxc-txt-2: rgba(234, 241, 245, .66);
  --gxc-txt-3: rgba(234, 241, 245, .44);
  --gxc-verde: #0F9D58;
  --gxc-verde-bright: #1FCB73;
  --gxc-verde-soft: rgba(31, 203, 115, .14);
  --gxc-verde-ink: #6FE0A6;
  --gxc-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --gxc-ease: cubic-bezier(.2, .7, .2, 1);
  font-family: var(--gxc-sans);
}

@keyframes gxc-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes gxc-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Banner ---------- */
.gxc-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  max-width: 384px;
  margin-left: auto;
  animation: gxc-in .3s var(--gxc-ease);
}
.gxc-card {
  background: var(--gxc-navy);
  border: 1px solid var(--gxc-line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .7);
  padding: 20px;
}
.gxc-head { display: flex; align-items: flex-start; gap: 12px; }
.gxc-ic {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--gxc-verde-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gxc-verde-bright);
}
.gxc-title { margin: 0; font-size: 14px; font-weight: 700; color: var(--gxc-txt); }
.gxc-text { margin: 4px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--gxc-txt-2); }
.gxc-text a { color: var(--gxc-verde-bright); font-weight: 600; text-decoration: none; }
.gxc-text a:hover { text-decoration: underline; }

.gxc-actions { display: flex; gap: 8px; margin-top: 16px; }

/* ---------- Botões ---------- */
.gxc-btn {
  flex: 1;
  font-family: var(--gxc-sans);
  font-weight: 600;
  font-size: 13.5px;
  border-radius: 11px;
  padding: 10px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: filter .18s, background .18s, border-color .18s;
  white-space: nowrap;
}
.gxc-btn-verde { background: var(--gxc-verde); color: #fff; }
.gxc-btn-verde:hover { filter: brightness(1.08); }
.gxc-btn-ghost { background: transparent; color: var(--gxc-txt); border-color: var(--gxc-line); }
.gxc-btn-ghost:hover { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04); }
.gxc-btn-lg { padding: 13px 16px; font-size: 14.5px; border-radius: 12px; }

/* ---------- Modal de preferências ---------- */
.gxc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 16, 27, .66);
  backdrop-filter: blur(3px);
  padding: 20px;
  animation: gxc-fade .2s var(--gxc-ease);
}
.gxc-modal {
  background: var(--gxc-navy);
  border: 1px solid var(--gxc-line);
  border-radius: 20px;
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .7);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: gxc-in .3s var(--gxc-ease);
}
.gxc-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gxc-line);
}
.gxc-modal-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--gxc-txt); }
.gxc-x {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--gxc-txt-3);
  display: flex;
  padding: 4px;
}
.gxc-x:hover { color: var(--gxc-txt); }

.gxc-modal-body {
  padding: 16px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gxc-intro { margin: 0; font-size: 13px; line-height: 1.55; color: var(--gxc-txt-2); }
.gxc-cat {
  border: 1px solid var(--gxc-line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.gxc-cat-name { margin: 0; font-size: 14px; font-weight: 600; color: var(--gxc-txt); display: flex; align-items: center; gap: 6px; }
.gxc-cat-name svg { color: var(--gxc-verde-bright); }
.gxc-cat-desc { margin: 6px 0 0; font-size: 12px; line-height: 1.55; color: var(--gxc-txt-2); }
.gxc-always {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--gxc-verde-ink);
  background: var(--gxc-verde-soft);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
}

/* Switch */
.gxc-switch {
  flex-shrink: 0;
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  padding: 0;
  background: rgba(255, 255, 255, .18);
  transition: background .2s var(--gxc-ease);
}
.gxc-switch[aria-checked="true"] { background: var(--gxc-verde); }
.gxc-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .2s var(--gxc-ease);
}
.gxc-switch[aria-checked="true"] .gxc-knob { transform: translateX(20px); }

.gxc-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--gxc-line);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.gxc-foot-row { display: flex; gap: 8px; }

@media (max-width: 460px) {
  .gxc-banner { max-width: none; }
}
