/* Cookie Consent Lite Styles */
#ccl-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999999;
    padding: 20px;
    display: none;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

#ccl-banner.ccl-show {
    display: block;
}

.ccl-container {
    max-width: 1200px;
    margin: 0 auto;
}

.ccl-content {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.ccl-text {
    flex: 1;
    min-width: 250px;
}

.ccl-text h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    color: #333;
}

.ccl-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.ccl-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ccl-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.ccl-btn-accept-all {
    background: #2271b1;
    color: #fff;
}

.ccl-btn-accept-all:hover {
    background: #135e96;
}

.ccl-btn-reject-all {
    background: #ddd;
    color: #333;
}

.ccl-btn-reject-all:hover {
    background: #ccc;
}

.ccl-btn-settings {
    background: transparent;
    color: #2271b1;
    border: 1px solid #2271b1;
}

.ccl-btn-settings:hover {
    background: #f0f0f0;
}

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

#ccl-modal.ccl-show {
    display: flex;
}

.ccl-modal-content {
    background: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.ccl-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ccl-modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.ccl-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.ccl-modal-close:hover {
    color: #333;
}

.ccl-modal-body {
    padding: 20px;
}

.ccl-cookie-category {
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.ccl-category-header {
    padding: 15px;
    background: #f5f5f5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.ccl-category-header::after {
    content: '▼';
    position: absolute;
    right: 70px; /* Espacio para el toggle */
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.ccl-category-header.ccl-collapsed::after {
    transform: rotate(-90deg);
}

.ccl-category-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ccl-category-title h3 {
    margin: 0;
    font-size: 16px;
}

.ccl-toggle {
    position: relative;
    width: 50px;
    height: 24px;
}

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

.ccl-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

.ccl-toggle input:checked + .ccl-toggle-slider {
    background-color: #2271b1;
}

.ccl-toggle input:checked + .ccl-toggle-slider:before {
    transform: translateX(26px);
}

.ccl-toggle input:disabled + .ccl-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.ccl-category-body {
    padding: 15px;
    display: block; /* Cambiado de none a block para mostrar por defecto */
}

.ccl-category-body.ccl-show {
    display: block;
}

.ccl-category-body.ccl-hide {
    display: none; /* Nueva clase para ocultar cuando se haga clic */
}

.ccl-category-description {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
}

.ccl-cookies-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ccl-cookie-item {
    padding: 10px;
    background: #f9f9f9;
    margin-bottom: 8px;
    border-radius: 4px;
}

.ccl-cookie-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.ccl-cookie-purpose {
    color: #666;
    font-size: 13px;
    margin-top: 4px;
}

.ccl-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    flex-wrap: wrap;
}

.ccl-modal-footer .ccl-btn {
    flex: 1;
    min-width: 140px;
}

/* Responsive */
@media (max-width: 768px) {
    #ccl-banner {
        padding: 15px;
    }
    
    .ccl-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .ccl-buttons {
        flex-direction: column;
    }
    
    .ccl-btn {
        width: 100%;
        text-align: center;
    }
    
    .ccl-modal-content {
        margin: 10px;
    }
}

/* Botón flotante para reabrir configuración */
.ccl-float-btn {
    position: fixed;
    bottom: 20px;
    left: 20px; /* Cambiado de right a left */
    width: 50px; /* Menos ancho */
    height: 50px; /* Menos alto, más cuadrado */
    border-radius: 8px !important; /* Menos redondeado - IMPORTANTE */
    background: #2271b1;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    display: flex; /* Siempre flex para mantener centrado el icono */
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    overflow: hidden; /* Para asegurar que el contenido respeta el border-radius */
}

.ccl-float-btn.ccl-visible {
    opacity: 1;
    visibility: visible;
    animation: fadeIn 0.3s ease-out;
}

.ccl-float-btn:hover {
    background: #135e96;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
    transform: scale(1.05);
}

.ccl-float-btn:active {
    transform: scale(0.95);
}

.ccl-float-btn svg {
    width: 26px;
    height: 26px;
}

/* Opción alternativa con emoji */
.ccl-float-btn-emoji .ccl-cookie-emoji {
    font-size: 28px;
    line-height: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive para el botón flotante */
@media (max-width: 768px) {
    .ccl-float-btn {
        bottom: 15px;
        left: 15px; /* Cambiado de right a left */
        width: 45px;
        height: 45px;
    }
    
    .ccl-float-btn svg {
        width: 24px;
        height: 24px;
    }
}
