﻿/* =============================================
   COOKIES.CSS — Banner de Consentimento LGPD
   RV Sport Store
   Identidade visual: #E4FF00 accent / dark theme
   ============================================= */

/* ── Overlay de fundo (aparece só no modo detalhado) ── */
.cookie-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 19998;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.cookie-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── Banner principal (bottom bar) ── */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 19999;
  background: #0d1118;
  border-top: 1px solid rgba(228, 255, 0, 0.18);
  box-shadow: 0 -8px 48px rgba(0, 0, 0, 0.7), 0 -1px 0 rgba(228,255,0,.08);
  transform: translateY(100%);
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
  will-change: transform;
}
.cookie-banner.show {
  transform: translateY(0);
}

/* Linha de destaque no topo */
.cookie-banner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #E4FF00 30%, #E4FF00 70%, transparent);
  opacity: .7;
}

/* ── Inner layout ── */
.cookie-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px 28px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── Ícone ── */
.cookie-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: rgba(228, 255, 0, 0.1);
  border: 1.5px solid rgba(228, 255, 0, 0.25);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
}

/* ── Texto ── */
.cookie-text {
  flex: 1;
  min-width: 0;
}
.cookie-title {
  font-family: 'Oswald', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .04em;
  margin-bottom: 4px;
}
.cookie-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #8899aa;
  line-height: 1.55;
}
.cookie-desc a {
  color: #E4FF00;
  text-decoration: none;
  font-weight: 600;
  transition: opacity .2s;
}
.cookie-desc a:hover { opacity: .75; }

/* ── Botões ── */
.cookie-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cookie-btn-settings {
  background: transparent;
  border: 1.5px solid #2a3448;
  color: #8899aa;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  white-space: nowrap;
}
.cookie-btn-settings:hover {
  border-color: #677080;
  color: #c0cce0;
}

.cookie-btn-reject {
  background: transparent;
  border: 1.5px solid rgba(255, 82, 82, 0.35);
  color: #ff7070;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  white-space: nowrap;
}
.cookie-btn-reject:hover {
  background: rgba(255, 82, 82, 0.08);
  border-color: #ff5252;
}

.cookie-btn-accept {
  background: #E4FF00;
  border: none;
  color: #07090C;
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 10px 22px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(228, 255, 0, 0.2);
  white-space: nowrap;
}
.cookie-btn-accept:hover {
  background: #d4ee00;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(228, 255, 0, 0.35);
}
.cookie-btn-accept:active { transform: scale(.97); }

/* ── Modal de Preferências ── */
.cookie-modal {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  z-index: 20000;
  width: 100%;
  max-width: 560px;
  background: #0d1118;
  border: 1px solid #1e2535;
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 28px 28px 32px;
  box-shadow: 0 -24px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(228,255,0,.05);
  opacity: 0;
  pointer-events: none;
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .3s ease;
}
.cookie-modal.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: all;
}

/* Linha de destaque no topo do modal */
.cookie-modal::before {
  content: '';
  position: absolute;
  top: 0; left: 20%; right: 20%;
  height: 2px;
  background: #E4FF00;
  border-radius: 0 0 4px 4px;
  opacity: .6;
}

.cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.cookie-modal-title {
  font-family: 'Oswald', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .03em;
}
.cookie-modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  border: none;
  color: #8899aa;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.cookie-modal-close:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ── Categorias de cookie ── */
.cookie-categories { display: flex; flex-direction: column; gap: 12px; margin-bottom: 24px; }

.cookie-category {
  background: #131820;
  border: 1px solid #1e2535;
  border-radius: 12px;
  padding: 14px 16px;
  transition: border-color .2s;
}
.cookie-category:hover { border-color: #2a3448; }

.cookie-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cookie-cat-info { flex: 1; }
.cookie-cat-name {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
}
.cookie-cat-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  color: #677080;
  line-height: 1.5;
}

/* Toggle switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.cookie-toggle input {
  opacity: 0; width: 0; height: 0;
}
.cookie-toggle-track {
  position: absolute;
  inset: 0;
  background: #1e2535;
  border-radius: 24px;
  cursor: pointer;
  transition: background .25s;
}
.cookie-toggle-track::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: #4a5568;
  border-radius: 50%;
  transition: transform .25s, background .25s;
}
.cookie-toggle input:checked + .cookie-toggle-track {
  background: rgba(228, 255, 0, 0.18);
  border: 1px solid rgba(228, 255, 0, 0.35);
}
.cookie-toggle input:checked + .cookie-toggle-track::after {
  transform: translateX(20px);
  background: #E4FF00;
}
.cookie-toggle input:disabled + .cookie-toggle-track {
  cursor: not-allowed;
  opacity: .6;
}

/* Badge "Necessário" */
.cookie-required-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #677080;
  background: #1e2535;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Botões do modal ── */
.cookie-modal-actions {
  display: flex;
  gap: 10px;
}
.cookie-modal-actions .cookie-btn-reject { flex: 1; padding: 12px; text-align: center; justify-content: center; }
.cookie-modal-actions .cookie-btn-accept { flex: 1; padding: 12px; text-align: center; }

/* ── Toast de confirmação ── */
.cookie-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 20001;
  background: #131820;
  border: 1px solid #1e2535;
  border-left: 3px solid #E4FF00;
  border-radius: 10px;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .35s cubic-bezier(.34,1.56,.64,1);
  white-space: nowrap;
}
.cookie-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.cookie-toast-icon { font-size: 16px; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
  }
  .cookie-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .cookie-btn-settings { flex: 1 1 auto; text-align: center; }
  .cookie-btn-reject   { flex: 1 1 auto; text-align: center; }
  .cookie-btn-accept   { flex: 1 1 100%; text-align: center; padding: 13px; font-size: 15px; }
}

@media (max-width: 480px) {
  .cookie-modal {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 24px 20px 28px;
  }
  .cookie-icon { display: none; }
}
