/* ==========================================================================
   Aventura Equipada España — Estilos del sistema de cookies
   ========================================================================== */

:root {
  --cookie-accent: #2e7d32; /* Verde bosque, acorde a la temática de camping */
  --cookie-accent-dark: #1b5e20;
}

/* ===== BANNER DE COOKIES ===== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  color: white;
  padding: 1rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-text a {
  color: #6bbf6b;
  text-decoration: none;
}

.cookie-text a:hover {
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.cookie-btn {
  padding: 0.5rem 1.25rem;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  white-space: nowrap;
}

.cookie-btn-reject {
  background: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
}
.cookie-btn-reject:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
}

.cookie-btn-customize {
  background: transparent;
  border: 1px solid var(--cookie-accent);
  color: var(--cookie-accent);
}
.cookie-btn-customize:hover {
  background: var(--cookie-accent);
  color: white;
  transform: translateY(-2px);
}

.cookie-btn-accept {
  background: var(--cookie-accent);
  color: white;
}
.cookie-btn-accept:hover {
  background: var(--cookie-accent-dark);
  transform: translateY(-2px);
}

/* ===== MODAL DE PREFERENCIAS ===== */
.cookie-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.cookie-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: white;
  color: #333;
  max-width: 500px;
  width: 100%;
  border-radius: 12px;
  padding: 2rem;
  position: relative;
  animation: slideIn 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-option {
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.cookie-option:hover {
  background: #f5f5f5;
}
.cookie-option.disabled {
  background: #f0f0f0;
  cursor: not-allowed;
  opacity: 0.7;
}

.cookie-option label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.cookie-option.disabled label {
  cursor: not-allowed;
}

.cookie-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}
.cookie-option.disabled input[type="checkbox"] {
  cursor: not-allowed;
}

.cookie-option small {
  display: block;
  margin-top: 0.5rem;
  color: #666;
  font-size: 0.8rem;
}

.modal-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.modal-buttons .cookie-btn {
  flex: 1;
  min-width: 140px;
  text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .cookie-content {
    flex-direction: column;
    text-align: center;
  }
  .cookie-buttons {
    justify-content: center;
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
    min-width: 100px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
  .cookie-modal-content {
    margin: 1rem;
    padding: 1.5rem;
  }
  .modal-buttons {
    flex-direction: column;
  }
  .modal-buttons .cookie-btn {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .cookie-buttons {
    flex-direction: column;
    width: 100%;
  }
  .cookie-btn {
    width: 100%;
    padding: 0.5rem;
  }
}

/* ===== ANIMACIONES ===== */
@keyframes slideIn {
  from { transform: translateY(-50px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
  from { transform: translateX(100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.cookie-policy-modal {
  animation: fadeIn 0.3s ease;
}
.cookie-policy-content {
  animation: slideIn 0.3s ease;
}

/* ==========================================================================
   BOTÓN FLOTANTE DE COOKIES — estilo acorde a la marca + entrada suave
   El botón lo crea componentes/galletas/script_boton_flotante_preferencias.js
   con estilos inline (verde). No se toca ese JS: aquí se le gana con
   !important, que sí tiene más prioridad que un estilo inline sin !important.
   ========================================================================== */
.cookie-floating-btn {
  background: var(--secondary-gradient, linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%)) !important;
  border: 2px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 8px 22px -6px rgba(79, 70, 229, 0.55), 0 2px 6px rgba(15, 23, 42, 0.15) !important;
  animation: cookieBtnEnter 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cookie-floating-btn:hover {
  box-shadow: 0 12px 28px -6px rgba(124, 58, 237, 0.6), 0 4px 10px rgba(15, 23, 42, 0.18) !important;
}

@keyframes cookieBtnEnter {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
