/*!
 * ============================================================================
 * Copyright © 2026 Diego Fernando Zapata. Todos los derechos reservados.
 * 
 * Desarrollado por: Diego Fernando Zapata
 * Sitio web: https://diegozapatadz.com
 * WhatsApp: +57 316 371 1641
 * Proyecto: Cea Langelorc - Sistema de Gestión de Cookies y Privacidad
 * Identificador: DZ-CEALANGELORC-2026-B8E29A1F
 * Versión: 1.2.3
 * Fecha: 2026-09-23
 * ============================================================================
 */

/* ============================================================================
   1. BANNER FLOTANTE DE CONSENTIMIENTO DE COOKIES
   ============================================================================ */
.cea-cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 24px;
  right: 24px;
  max-width: 960px;
  margin: 0 auto;
  z-index: 99990;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 26px;
  background: linear-gradient(135deg, rgba(8, 25, 51, 0.97) 0%, rgba(12, 36, 70, 0.96) 100%);
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(2, 8, 20, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #f1f5f9;
  font-family: inherit;
  opacity: 0;
  transform: translateY(28px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.cea-cookie-banner.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.cea-cookie-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cea-cookie-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 999px;
  color: #7dd3fc;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cea-cookie-badge svg {
  width: 14px;
  height: 14px;
}

.cea-cookie-title {
  margin: 0;
  font-size: 16px;
  font-weight: 750;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.cea-cookie-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

.cea-cookie-text a {
  color: #38bdf8;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.cea-cookie-text a:hover {
  color: #7dd3fc;
}

.cea-cookie-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
}

.btn-cookie-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  color: #ffffff;
  border: 0;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-cookie-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.45);
}

.btn-cookie-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-cookie-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-1px);
}

.btn-cookie-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: transparent;
  color: #94a3b8;
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  margin-left: auto;
  transition: color 0.15s ease, background 0.15s ease;
}

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

/* ============================================================================
   2. MODAL DE PREFERENCIAS DE COOKIES (PERSONALIZACIÓN)
   ============================================================================ */
.cea-cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 10, 24, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cea-cookie-modal-backdrop.is-active {
  opacity: 1;
  pointer-events: auto;
}

.cea-cookie-modal {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 48px);
  background: #091a34;
  border: 1px solid rgba(147, 197, 253, 0.28);
  border-radius: 20px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.06) inset;
  color: #f1f5f9;
  overflow: hidden;
  transform: scale(0.96) translateY(10px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cea-cookie-modal-backdrop.is-active .cea-cookie-modal {
  transform: scale(1) translateY(0);
}

.cea-cookie-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.cea-cookie-modal-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.cea-cookie-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 750;
  color: #ffffff;
}

.cea-cookie-modal-subtitle {
  margin: 0;
  font-size: 12.5px;
  color: #94a3b8;
}

.cea-cookie-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.cea-cookie-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.cea-cookie-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overscroll-behavior: contain;
}

.cea-cookie-modal-intro {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

/* Tarjetas de Categoría */
.cea-cookie-cat-card {
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s ease;
}

.cea-cookie-cat-card:hover {
  border-color: rgba(147, 197, 253, 0.22);
}

.cea-cookie-cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cea-cookie-cat-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 700;
  color: #ffffff;
}

.cea-cookie-cat-badge-locked {
  display: inline-block;
  padding: 3px 9px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 999px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.cea-cookie-cat-desc {
  margin: 0;
  font-size: 12.8px;
  line-height: 1.5;
  color: #94a3b8;
}

/* Switch Toggle UI */
.cea-toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

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

.cea-toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #334155;
  border-radius: 34px;
  transition: background-color 0.2s ease;
}

.cea-toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.cea-toggle-switch input:checked + .cea-toggle-slider {
  background-color: #059669;
}

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

.cea-toggle-switch input:disabled + .cea-toggle-slider {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Modal Footer */
.cea-cookie-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

/* ============================================================================
   3. BOTÓN FLOTANTE DISCRETO PARA REABRIR CONFIGURACIÓN (LOWER-LEFT CHIP)
   ============================================================================ */
.cea-cookie-trigger-chip {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: rgba(8, 25, 51, 0.92);
  border: 1px solid rgba(147, 197, 253, 0.22);
  border-radius: 999px;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 650;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.32);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.cea-cookie-trigger-chip:hover {
  background: #0d2850;
  color: #ffffff;
  border-color: rgba(147, 197, 253, 0.45);
  transform: translateY(-2px);
}

.cea-cookie-trigger-chip svg {
  width: 15px;
  height: 15px;
  color: #38bdf8;
}

/* ============================================================================
   4. ADAPTACIÓN RESPONSIVA
   ============================================================================ */
@media (max-width: 768px) {
  .cea-cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 18px 18px;
    border-radius: 16px;
    gap: 14px;
  }

  .cea-cookie-title {
    font-size: 15px;
  }

  .cea-cookie-text {
    font-size: 12.8px;
  }

  .cea-cookie-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .btn-cookie-primary,
  .btn-cookie-secondary,
  .btn-cookie-ghost {
    width: 100%;
    margin-left: 0;
  }

  .cea-cookie-trigger-chip {
    left: 14px;
    bottom: 14px;
    padding: 7px 12px;
    font-size: 11.5px;
  }

  .cea-cookie-modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
  }

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