@charset "utf-8";
/* ============================
   COOKIES PLUS PRO - CSS REDISEÑADO
   ============================ */

/* Banner Principal */
.cookiesplus-banner {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    display: none;
    padding: 15px 0;
    background: rgba(0,0,0,0.9);
}

.cookiesplus-banner--visible {
    display: block;
    animation: slideInUp 0.5s ease;
}

.cookiesplus--bottom {
    bottom: 0;
}

.cookiesplus--top {
    top: 0;
}

.cookiesplus-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.cookiesplus-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

/* ============================
   LAYOUT RESPONSIVE REDESIGN
   ============================ */

.cookiesplus-layout {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookiesplus-text {
    text-align: center;
    flex: 1;
}

.cookiesplus-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.cookiesplus-actions .btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

/* Botones específicos */
.btn-accept {
    background: var(--cp-accept, #10b981) !important;
    color: var(--cp-accept-txt, #ffffff) !important;
    order: 3; /* Último en móvil */
}

.btn-reject {
    background: var(--cp-reject, #6c757d) !important;
    color: var(--cp-reject-txt, #ffffff) !important;
    order: 2;
}

.btn-config {
    background: transparent !important;
    color: var(--cp-text, #ffffff) !important;
    border: 1px solid var(--cp-text, #ffffff) !important;
    order: 1; /* Primero en móvil */
}

/* 💻 ESCRITORIO (> 768px) */
@media (min-width: 768px) {
    .cookiesplus-layout {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
    }
    
    .cookiesplus-text {
        text-align: left;
        flex: 1;
        margin: 0;
    }
    
    .cookiesplus-actions {
        flex-direction: row;
        width: auto;
        gap: 8px;
    }
    
    .cookiesplus-actions .btn {
        width: auto;
        min-width: 140px;
        padding: 10px 16px;
        white-space: nowrap;
    }
    
    /* Reordenar botones para escritorio */
    .btn-accept { order: 3; }
    .btn-reject { order: 2; }
    .btn-config { order: 1; }
}

/* 📱 MÓVIL (< 768px) */
@media (max-width: 767px) {
    .cookiesplus-content {
        padding: 0 10px;
    }
    
    .cookiesplus-card {
        padding: 20px 15px;
    }
    
    .cookiesplus-message {
        font-size: 14px;
        line-height: 1.4;
        margin-bottom: 0;
    }
    
    .cookiesplus-actions .btn {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    /* Espaciado adicional en móvil */
    .cookiesplus-layout {
        gap: 20px;
    }
}

/* Mejoras visuales generales */
.cookiesplus-message {
    margin: 0;
    line-height: 1.5;
    color: inherit;
    font-size: 15px;
}

.cookiesplus-link {
    color: inherit;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 5px;
}

/* Efectos hover solo en escritorio */
@media (min-width: 768px) {
    .cookiesplus-actions .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
}

/* Asegurar que el banner sea visible */
#cookiesplus-banner.cookiesplus-universal {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 99999 !important;
    position: fixed !important;
}

/* ============================
   ESTILOS PARA EL MODAL (se mantienen)
   ============================ */

/* Modal */
#cookiesplus-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookiesplus-modal.show {
    display: flex !important;
}

#cookiesplus-modal .modal-dialog {
    background: #fff;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ... (el resto del CSS del modal se mantiene igual) */

/* ============================
   FIXES Y COMPATIBILIDAD
   ============================ */

/* ✅ SOLUCIÓN ESPECÍFICA PARA THEME AYON */
body.theme-ayon #cookiesplus-banner,
body.ayon-theme #cookiesplus-banner,
body.ayon #cookiesplus-banner {
    z-index: 99999 !important;
    position: fixed !important;
}

/* ✅ DESBLOQUEAR CLICS EN BOTONES */
#cookiesplus-banner .btn,
#cookiesplus-modal .btn {
    pointer-events: auto !important;
    cursor: pointer !important;
    position: relative !important;
    z-index: 100000 !important;
}

/* ✅ FIX NUCLEAR - OCULTAR BANNER */
#cookiesplus-banner:not(.cookiesplus-banner--visible) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(100%) !important;
}

/* Animaciones */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Estilos específicos para el banner con colores personalizados */
#cookiesplus-banner .cookiesplus-card { 
    background: var(--cp-bg, #1e293b) !important; 
    color: var(--cp-text, #ffffff) !important; 
}

#cookiesplus-banner .cookiesplus-message { 
    color: var(--cp-text, #ffffff) !important; 
}

.cookiesplus-link {
    color: var(--cp-text, #ffffff) !important;
    text-decoration: underline !important;
}

/* ============================
   MODAL REDISEADO - ACORDEN
   ============================ */

.cp-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Secciones del acorden */
.cp-section {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #f8fafc;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.cp-section-header:hover {
  background: #f1f5f9;
}

.cp-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.cp-section-title h6 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.cp-icon {
  font-size: 12px;
  color: #6b7280;
  transition: transform 0.3s ease;
  width: 16px;
  text-align: center;
}

.cp-section.expanded .cp-icon {
  transform: rotate(90deg);
}

.cp-section.required .cp-icon {
  color: #ef4444;
  transform: none !important;
}

.badge {
  background: #dcfce7;
  color: #166534;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

/* Contenido desplegable */
.cp-section-content {
  display: none;
  padding: 0 20px 20px;
  background: white;
}

.cp-section.expanded .cp-section-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

.cp-desc {
  margin: 0 0 16px 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
}

/* Lista de cookies */
.cookies-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cookie-item {
  padding: 12px;
  background: #f8fafc;
  border-radius: 6px;
  border-left: 3px solid #3b82f6;
}

.cookie-item strong {
  display: block;
  font-size: 13px;
  color: #1f2937;
  margin-bottom: 4px;
}

.cookie-provider {
  font-size: 11px;
  color: #6b7280;
  background: #e5e7eb;
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 8px;
}

.cookie-desc {
  margin: 4px 0 0 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

/* ============================
   INTERRUPTORES DESLIZANTES
   ============================ */

.cp-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cp-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

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

.cp-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .cp-slider {
  background-color: #10b981;
}

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

/* Estados deshabilitados para cookies requeridas */
.cp-section.required .cp-toggle {
  opacity: 0.6;
  cursor: not-allowed;
}

.cp-section.required .cp-slider {
  background-color: #10b981 !important;
}

/* ============================
   ANIMACIONES
   ============================ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================
   RESPONSIVE
   ============================ */

@media (max-width: 768px) {
  .cp-section-header {
    padding: 14px 16px;
  }
  
  .cp-section-content {
    padding: 0 16px 16px;
  }
  
  .cp-section-title {
    gap: 8px;
  }
  
  .cp-section-title h6 {
    font-size: 13px;
  }
}