/* Componentes compartidos por Simulador y Resultados */

/* Normalización estructural compartida */
html,
body {
    width: 100%;
    max-width: 100%;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Alertas y resúmenes de validación */
.bsp-alert {
    padding: 0.1rem 0.5rem;
    border-radius: 8px;
    background: #fdf0f0;
}

.bsp-alert .ui-messages-error-summary {
    display: block;
    margin-bottom: 0.35rem;
    color: #a32d2d;
    font-weight: 600;
}

.bsp-alert .ui-messages-error-detail {
    color: #a32d2d;
    font-size: 0.875rem;
}

body .bsp-alert .ui-messages-error {
    border-color: #e62a10;
    background-color: #ffe1dd;
    color: #ffffff;
}

/* Footer compartido */
.site-footer {
    width: 100%;
    margin-top: 60px;
    color: #ffffff;
    background-color: #0c54ff;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

.footer-left {
    text-align: left;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-social-link {
    display: inline-flex;
    padding: 0.25rem;
    font-size: 1rem;
}

.footer-social-icon {
    display: block;
    width: 32px;
    height: auto;
}

.footer-right {
    text-align: right;
}

.footer-acreditacion {
    display: inline-block;
    width: 180px;
    max-width: 100%;
    height: auto;
}

.footer-bottom {
    padding: 18px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.footer-copyright {
    margin: 0;
    color: #ffffff;
    font-size: 12px;
}

@media (max-width: 768px) {
    .footer-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        padding: 35px 20px;
        text-align: center;
    }

    .footer-left,
    .footer-social,
    .footer-right {
        width: 100%;
        text-align: center;
    }

    .footer-left p {
        font-size: 0.7rem;
    }

    .footer-social-icon {
        width: 22px;
    }

    .footer-acreditacion {
        width: 90px;
    }
}

/* Paneles desplegables compartidos */
body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-filter-container {
    position: relative;
    display: inline-block;
    width: 50% !important;
    margin: 0;
    padding: 0.4em;
}

@media (max-width: 650px) {
    body.benefits-page .ui-selectonemenu-panel {
        left: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        box-sizing: border-box;
    }

    body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-items-wrapper {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden !important;
    }

    body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-list {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-list-item {
        max-width: 100%;
        box-sizing: border-box;
        padding: 12px 10px !important;
        font-size: 15px;
        line-height: 1.35;
        white-space: normal !important;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-filter-container {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    body.benefits-page .ui-selectonemenu-panel .ui-selectonemenu-filter {
        display: block;
        width: 100% !important;
        max-width: 100%;
        min-height: 40px;
        box-sizing: border-box;
    }
}