/* ============================================= */
/* LEGAL ESPAÑA ULTIMATE – ESTILOS 2025         */
/* ============================================= */

#legal-ultimate-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(20, 20, 30, 0.98);
    color: #fff;
    padding: 20px 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 15px;
    line-height: 1.5;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    border-top: 1px solid #444;
}

#legal-ultimate-banner .legal-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

#legal-ultimate-banner .legal-text {
    flex: 1;
    min-width: 300px;
    margin: 0;
}

#legal-ultimate-banner .legal-text a {
    color: #00ccff;
    text-decoration: underline;
}

#legal-ultimate-banner .legal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.legal-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    font-size: 14px;
}

.legal-btn-accept { background: #00a32a; color: white; }
.legal-btn-reject { background: #d63638; color: white; }
.legal-btn-config { background: #2271b1; color: white; }

.legal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

/* Modal segunda capa */
#legal-ultimate-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.85);
    z-index: 1000000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

#legal-ultimate-modal.active { display: flex; }

#legal-modal-content {
    background: #fff;
    color: #333;
    padding: 30px;
    border-radius: 12px;
    max-width: 680px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

#legal-modal-content h2 {
    margin-top: 0;
    color: #1a1a1a;
    border-bottom: 2px solid #2271b1;
    padding-bottom: 10px;
}

.legal-category {
    margin: 25px 0;
    padding: 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 5px solid #2271b1;
}

.legal-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
}

.legal-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.legal-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.legal-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.legal-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .legal-slider {
    background-color: #00a32a;
}

input:checked + .legal-slider:before {
    transform: translateX(26px);
}

.legal-category p {
    margin: 12px 0 0;
    font-size: 14px;
    color: #555;
}

/* Botón flotante "Modificar consentimiento" */
.legal-floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2271b1;
    color: white;
    padding: 12px 18px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(34,113,177,0.4);
    cursor: pointer;
    z-index: 99999;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.legal-floating-btn:hover {
    background: #1a5a8c;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    #legal-ultimate-banner .legal-container {
        flex-direction: column;
        text-align: center;
    }
    .legal-btn { width: 100%; margin: 5px 0; }
}