/**
 * Estilos para el Sistema de Gestión de Cookies
 * Universidad Sapientia
 */

/* Banner de Cookies */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-top: 3px solid var(--primary);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    display: none;
    padding: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
}

#cookie-banner.hide {
    opacity: 0;
    transform: translateY(100%);
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 0.5rem 0;
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: bold;
}

.cookie-banner-text p {
    margin: 0;
    color: #555;
    line-height: 1.4;
    font-size: 0.9rem;
}

.cookie-banner-text a {
    color: var(--primary);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.btn-accept-all, .btn-configure, .btn-save {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: bold;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-accept-all {
    background: var(--primary);
    color: white;
}

.btn-accept-all:hover {
    background: #1e2651;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 48, 99, 0.3);
}

.btn-configure {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-configure:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-save {
    background: #28a745;
    color: white;
}

.btn-save:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Modal de Configuración de Cookies */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#cookie-settings-modal.show {
    opacity: 1;
}

.cookie-modal-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cookie-modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.3rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cookie-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body > p {
    margin: 0 0 1.5rem 0;
    color: #666;
    line-height: 1.5;
}

.cookie-category {
    margin-bottom: 1.5rem;
    border: 1px solid #e2e6f0;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s ease;
}

.cookie-category:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cookie-category-header h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1rem;
}

.cookie-category p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Switch Toggle para cookies */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .cookie-slider {
    background-color: var(--primary);
}

input:focus + .cookie-slider {
    box-shadow: 0 0 1px var(--primary);
}

input:checked + .cookie-slider:before {
    transform: translateX(26px);
}

input:disabled + .cookie-slider {
    background-color: #28a745;
    cursor: not-allowed;
}

input:disabled + .cookie-slider:before {
    background-color: white;
}

.cookie-modal-footer {
    background: #f8f9fa;
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid #e2e6f0;
}

/* Responsive para móviles */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .cookie-banner-buttons {
        justify-content: center;
    }

    .btn-accept-all, .btn-configure, .btn-save {
        flex: 1;
        min-width: 120px;
    }

    .cookie-modal-content {
        margin: 0.5rem;
        max-height: 95vh;
    }

    .cookie-modal-header {
        padding: 1rem;
    }

    .cookie-modal-header h2 {
        font-size: 1.1rem;
    }

    .cookie-modal-body {
        padding: 1rem;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 1rem;
    }

    .cookie-modal-footer .btn-accept-all,
    .cookie-modal-footer .btn-save {
        width: 100%;
    }
}

/* Animaciones adicionales */
@media (prefers-reduced-motion: reduce) {
    #cookie-banner,
    .cookie-modal-content,
    .cookie-slider,
    .btn-accept-all,
    .btn-configure,
    .btn-save {
        transition: none;
        animation: none;
    }
} 