/* Gestor de Cookies - NSD Final */

/* Banner de Cookies */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 400px;
    max-width: calc(100vw - 40px);
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.cookie-banner-visible {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-banner-text {
    flex: 1;
}

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: var(--color-text);
}

.cookie-banner-text p {
    margin: 0;
    font-size: 13px;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-btn-settings {
    background-color: var(--color-bg);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.cookie-btn-settings:hover {
    background-color: var(--color-border);
}

.cookie-btn-accept {
    background-color: #0d5c6b;
    color: white;
}

.cookie-btn-accept:hover {
    background-color: #0a4a57;
}

.cookie-btn-reject {
    background-color: var(--color-bg);
    color: var(--color-text-muted);
}

.cookie-btn-reject:hover {
    background-color: var(--color-border);
}

.cookie-btn-save {
    background-color: #0d5c6b;
    color: white;
    width: 100%;
}

.cookie-btn-save:hover {
    background-color: #0a4a57;
}

/* Modal de Configuración */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-settings-visible {
    opacity: 1;
    visibility: visible;
}

.cookie-settings-content {
    background-color: #ffffff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

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

.cookie-settings-header h3 {
    margin: 0;
    font-size: 20px;
    color: #333333;
}

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

.cookie-settings-close:hover {
    color: #333333;
}

.cookie-settings-body {
    padding: 20px;
}

.cookie-category {
    margin-bottom: 20px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

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

.cookie-category-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333333;
}

.cookie-category-info p {
    margin: 0;
    font-size: 13px;
    color: #666666;
    line-height: 1.4;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

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

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #0d5c6b;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #e0e0e0;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-settings-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-toggle {
        width: 100%;
    }
}
