/* Sistema de Cookies GDPR - Estilos */

/* Banner Principal */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a5f7a 0%, #57c5b6 100%);
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
}

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

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

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    opacity: 0.95;
}

.cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-banner-actions .btn {
    white-space: nowrap;
    font-weight: 500;
}

/* Modal de Configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    opacity: 1;
}

.cookie-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal-content {
    position: relative;
    background: var(--bs-body-bg, white);
    color: var(--bs-body-color, #333);
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.cookie-modal.show .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--bs-border-color, #ddd);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--bs-body-color, #333);
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-close:hover {
    opacity: 1;
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-intro {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--bs-secondary-color, #666);
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
    border-radius: 12px;
    border: 1px solid var(--bs-border-color, #e9ecef);
}

.cookie-category-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.cookie-category h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.cookie-category p {
    margin: 0 0 0.75rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--bs-secondary-color, #666);
}

.cookie-category ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.5rem;
    font-size: 0.85rem;
    color: var(--bs-secondary-color, #666);
}

.cookie-category li {
    margin-bottom: 0.25rem;
}

.cookie-always-active {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #28a745;
    color: white;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.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: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

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

.cookie-switch input:checked + .cookie-slider {
    background-color: #1a5f7a;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #28a745;
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--bs-border-color, #ddd);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toast de Confirmación */
.cookie-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 10001;
    font-weight: 500;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-actions {
        justify-content: stretch;
    }
    
    .cookie-banner-actions .btn {
        flex: 1;
    }
    
    .cookie-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .cookie-category-header {
        flex-direction: column;
    }
    
    .cookie-toast {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }
}

/* Modo Oscuro */
@media (prefers-color-scheme: dark) {
    .cookie-modal-backdrop {
        background: rgba(0, 0, 0, 0.85);
    }
}
