/* SIVIA Cookie Consent Banner Styles */

/* Banner Principal */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(197, 165, 114, 0.2);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 2rem;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transition: opacity 0.3s ease;
}

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

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

.cookie-banner-text h3 {
    font-family: 'Space Grotesk', serif;
    font-size: 1.25rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cookie-banner-text p {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

/* Botones */
.cookie-btn {
    font-family: 'Outfit', sans-serif;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: #2563EB;
    color: white;
    border: 2px solid #2563EB;
}

.cookie-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.cookie-btn-secondary {
    background: transparent;
    color: #1e293b;
    border: 2px solid #e2e8f0;
}

.cookie-btn-secondary:hover {
    border-color: #2563EB;
    color: #2563EB;
}

.cookie-btn-text {
    background: transparent;
    color: #64748b;
    border: none;
}

.cookie-btn-text:hover {
    color: #1e293b;
}

/* Panel de Personalización */
#cookie-customize-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-panel-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: scaleIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-panel-header {
    padding: 2rem;
    border-bottom: 1px solid rgba(197, 165, 114, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-panel-header h2 {
    font-family: 'Space Grotesk', serif;
    font-size: 1.5rem;
    color: #1e293b;
    font-weight: 600;
    margin: 0;
}

.cookie-panel-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.cookie-panel-close:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.cookie-panel-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-panel-body > p {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: #f7f7f5;
    border-radius: 8px;
    border: 1px solid rgba(197, 165, 114, 0.15);
}

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

.cookie-category h3 {
    font-family: 'Space Grotesk', serif;
    font-size: 1.1rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cookie-category p {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

/* Switch Toggle */
.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: #cbd5e1;
    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: #2563EB;
}

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

.cookie-switch input:disabled + .cookie-slider {
    background-color: #2563EB;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer del Panel */
.cookie-panel-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(197, 165, 114, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafaf8;
}

.cookie-link {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.cookie-link:hover {
    text-decoration: underline;
}

.cookie-panel-actions {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    #cookie-consent-banner {
        padding: 1.5rem;
    }

    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-banner-buttons {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-panel-content {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-panel-header,
    .cookie-panel-body,
    .cookie-panel-footer {
        padding: 1.5rem;
    }

    .cookie-panel-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .cookie-panel-actions {
        flex-direction: column;
    }

    .cookie-category-header {
        flex-direction: column;
    }

    .cookie-switch {
        align-self: flex-start;
    }
}
