/**
 * ============================================================================
 * BANNER Y MODAL DE CONSENTIMIENTO DE COOKIES (RGPD / ePrivacy)
 * TEAM LAST - DISEÑADO POR LEANDRUS (https://leandrus.net)
 * ============================================================================
 */

/* Banner flotante de Cookies */
.cookie-consent-banner {
  position: fixed;
  bottom: 25px;
  left: 25px;
  right: 25px;
  max-width: 900px;
  margin: 0 auto;
  background: rgba(20, 22, 28, 0.96);
  border: 1px solid rgba(230, 120, 23, 0.4);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  border-radius: 12px;
  padding: 24px 30px;
  z-index: 999999;
  display: none;
  animation: slideUpCookie 0.4s ease forwards;
  font-family: 'Inter', sans-serif;
}

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

.cookie-consent-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  flex-wrap: wrap;
}

.cookie-consent-text {
  flex: 1 1 500px;
}

.cookie-consent-text h4 {
  font-family: 'Playfair Display', serif;
  color: #ffffff;
  font-size: 1.25rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.cookie-consent-text h4 i {
  color: #E67817;
}

.cookie-consent-text p {
  color: #b0b8c4;
  font-size: 0.92rem;
  line-height: 1.5;
  margin: 0;
}

.cookie-consent-text a {
  color: #E67817;
  text-decoration: underline;
}

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

.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-cookie {
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  font-family: 'Inter', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cookie-accept {
  background: #E67817;
  color: #ffffff;
}

.btn-cookie-accept:hover {
  background: #ff8c2b;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 120, 23, 0.4);
}

.btn-cookie-reject {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cookie-reject:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-cookie-config {
  background: transparent;
  color: #a0abb8;
  border: 1px solid transparent;
  text-decoration: underline;
  padding: 10px 10px;
}

.btn-cookie-config:hover {
  color: #ffffff;
}

/* Modal de Configuración Avanzada de Cookies */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 1000000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.cookie-modal {
  background: #181a20;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  max-width: 650px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  padding: 30px;
  color: #cfd4dc;
  font-family: 'Inter', sans-serif;
}

.cookie-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.cookie-modal-header h3 {
  font-family: 'Playfair Display', serif;
  color: #ffffff;
  font-size: 1.5rem;
  margin: 0;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  color: #a0abb8;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.cookie-modal-close:hover {
  color: #ffffff;
}

.cookie-group {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

.cookie-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-group-header h5 {
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.cookie-badge-required {
  background: rgba(9, 72, 143, 0.4);
  color: #6ba8ff;
  border: 1px solid #09488f;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  font-weight: 600;
}

/* Switch Toggle personalizado */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
}

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

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #333742;
  transition: .3s;
  border-radius: 34px;
}

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

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

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

.cookie-group p {
  font-size: 0.88rem;
  color: #9fa7b5;
  margin: 0;
  line-height: 1.5;
}

.cookie-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  margin-top: 20px;
}

/* Adaptabilidad para teléfonos y pantallas móviles */
@media (max-width: 768px) {
  .cookie-consent-banner {
    left: 10px;
    right: 10px;
    bottom: 12px;
    padding: 16px 14px;
    border-radius: 10px;
  }

  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  .cookie-consent-text h4 {
    font-size: 1.1rem;
  }

  .cookie-consent-text p {
    font-size: 0.82rem;
  }

  .cookie-consent-actions {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .btn-cookie {
    width: 100%;
    text-align: center;
    padding: 11px 14px;
    font-size: 0.84rem;
  }

  .cookie-modal {
    padding: 20px 16px;
    max-height: 85vh;
    border-radius: 10px;
  }

  .cookie-modal-header h3 {
    font-size: 1.25rem;
  }

  .cookie-modal-footer {
    justify-content: stretch;
  }

  .cookie-modal-footer .btn-cookie {
    width: 100%;
  }
}

