/* ========================================
   COOKIE CONSENT POPUP STYLES
   Estilo similar a la referencia visual
   ======================================== */

/* Overlay de fondo */
.cookie-consent-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99998;
}

/* Banner de cookies - Barra inferior */
.cookie-consent-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.15);
    z-index: 99999;
    padding: 15px 0;
    border-top: 3px solid #e74c3c;
}

.cookie-consent-banner.show {
    display: block;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
    padding-right: 20px;
    color: #c0392b;
    font-size: 14px;
    line-height: 1.5;
}

.cookie-consent-text a {
    color: #c0392b;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-consent-text a:hover {
    color: #e74c3c;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.cookie-btn {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.cookie-btn-settings {
    background-color: #fff;
    color: #333;
    border: 1px solid #333;
}

.cookie-btn-settings:hover {
    background-color: #f5f5f5;
    color: #000;
}

.cookie-btn-accept {
    background-color: #333;
    color: #fff;
    border: 1px solid #333;
}

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

/* Modal de configuración de cookies */
.cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 100000;
    overflow-y: auto;
    padding: 20px;
}

.cookie-settings-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

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

.cookie-settings-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    line-height: 1;
}

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

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

.cookie-settings-intro {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-category {
    border: 1px solid #eee;
    border-radius: 6px;
    margin-bottom: 15px;
    overflow: hidden;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    cursor: pointer;
}

.cookie-category-header:hover {
    background-color: #f0f0f0;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-name {
    font-weight: 600;
    color: #333;
    font-size: 15px;
    margin-bottom: 3px;
}

.cookie-category-description {
    font-size: 13px;
    color: #666;
}

.cookie-category-toggle {
    margin-left: 15px;
}

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

.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: #ccc;
    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: #27ae60;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    background-color: #27ae60;
    cursor: not-allowed;
}

.cookie-category-details {
    display: none;
    padding: 15px;
    background-color: #fff;
    border-top: 1px solid #eee;
    font-size: 13px;
    color: #666;
}

.cookie-category.expanded .cookie-category-details {
    display: block;
}

.cookie-category-expand {
    margin-left: 10px;
    color: #999;
    transition: transform 0.3s;
}

.cookie-category.expanded .cookie-category-expand {
    transform: rotate(180deg);
}

.cookie-settings-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn-reject {
    background-color: #fff;
    color: #666;
    border: 1px solid #ddd;
}

.cookie-btn-reject:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.cookie-btn-save {
    background-color: #e74c3c;
    color: #fff;
    border: 1px solid #e74c3c;
}

.cookie-btn-save:hover {
    background-color: #c0392b;
    border-color: #c0392b;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        text-align: center;
    }

    .cookie-consent-text {
        padding-right: 0;
        padding-bottom: 15px;
        min-width: 100%;
    }

    .cookie-consent-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
        min-width: 100px;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

    .cookie-settings-footer .cookie-btn {
        width: 100%;
    }
}

/* Animación de entrada */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.show {
    animation: slideUp 0.4s ease-out;
}

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

.cookie-settings-modal.show {
    animation: fadeIn 0.3s ease-out;
}
