/* ==========================================================================
   Elétrica Medina — Estilos do Banner e Modal LGPD (Mobile-First)
   Conforme Lei nº 13.709/2018 (Lei Geral de Proteção de Dados)
   Suporte a Tema Claro (Padrão) e Tema Escuro ([data-theme="dark"])
   ========================================================================== */

.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f1f5f9;
  border-top: 3px solid #f59e0b;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  z-index: 99999;
  padding: 1rem 1rem;
  animation: slideUpCookie 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (min-width: 768px) {
  .cookie-banner {
    padding: 1.25rem 1.5rem;
  }
}

[data-theme="dark"] .cookie-banner {
  background: rgba(11, 17, 32, 0.98);
  border-top: 3px solid #f59e0b;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideUpCookie {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-banner-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .cookie-banner-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

.cookie-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: #cbd5e1;
}

@media (min-width: 768px) {
  .cookie-text {
    font-size: 0.9rem;
  }
}

.cookie-text a {
  color: #fbbf24;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.2s ease;
}

.cookie-text a:hover {
  color: #ffffff;
}

.cookie-buttons {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 0.45rem;
}

@media (min-width: 600px) {
  .cookie-buttons {
    flex-direction: row;
    flex-wrap: wrap;
    width: auto;
    align-items: center;
    gap: 0.65rem;
  }
}

.cookie-btn {
  padding: 0.65rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  border: 1px solid transparent;
  width: 100%;
  text-align: center;
}

@media (min-width: 600px) {
  .cookie-btn {
    width: auto;
  }
}

.cookie-btn-primary {
  background: #f59e0b;
  color: #0f172a;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

.cookie-btn-primary:hover {
  background: #d97706;
  color: #ffffff;
  transform: translateY(-1px);
}

.cookie-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.cookie-btn-outline {
  background: transparent;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cookie-btn-outline:hover {
  color: #fbbf24;
  border-color: #fbbf24;
}

/* Modal de Personalização */
.cookie-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-modal {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .cookie-modal {
  background: #0f172a;
  border-color: #334155;
  color: #f8fafc;
}

.cookie-modal-header {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

[data-theme="dark"] .cookie-modal-header {
  border-color: #334155;
}

.cookie-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: #0f172a;
}

[data-theme="dark"] .cookie-modal-header h3 {
  color: #f8fafc;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64748b;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cookie-modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="dark"] .cookie-modal-close:hover {
  background: #1e293b;
  color: #ffffff;
}

.cookie-modal-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
}

[data-theme="dark"] .cookie-item {
  background: #1e293b;
  border-color: #334155;
}

.cookie-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.cookie-item-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #0f172a;
}

[data-theme="dark"] .cookie-item-title {
  color: #f8fafc;
}

.cookie-item-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: #e2e8f0;
  color: #475569;
}

[data-theme="dark"] .cookie-item-badge {
  background: #334155;
  color: #cbd5e1;
}

.cookie-item-desc {
  font-size: 0.8rem;
  line-height: 1.45;
  color: #64748b;
  margin: 0;
}

[data-theme="dark"] .cookie-item-desc {
  color: #94a3b8;
}

/* Switch iOS Style */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #f59e0b;
}

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

.cookie-modal-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
}

[data-theme="dark"] .cookie-modal-footer {
  border-color: #334155;
}

/* Botão Flutuante Permanente no Rodapé */
.cookie-prefs-floating-btn {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(15, 23, 42, 0.9);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50px;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 9995;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cookie-prefs-floating-btn:hover {
  background: #0f172a;
  color: #f59e0b;
  border-color: #f59e0b;
  transform: translateY(-2px);
}
