/* ======================================================
   PGJE - Menú lateral responsivo Roundcube Elastic
   ====================================================== */

/* Evita desbordes laterales */
#layout-menu,
#taskmenu,
#taskmenu .special-buttons {
    overflow-x: hidden !important;
}

/* Logo institucional */
.pgje-logo-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 62px !important;
    padding: 5px 3px !important;
    box-sizing: border-box !important;
}

.pgje-sidebar-logo {
    display: block !important;
    width: auto !important;
    max-width: 46px !important;
    max-height: 48px !important;
    object-fit: contain !important;
    margin: 0 auto !important;
}

/* Botón de soporte técnico */
.pgje-support-item {
    min-height: 68px !important;
    height: auto !important;
    padding: 7px 3px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    overflow: hidden !important;
    white-space: normal !important;
}

/* Ícono del soporte */
.pgje-support-item:before,
.pgje-support-item .icon,
.pgje-support-item [class*="icon"],
.pgje-support-item .fa,
.pgje-support-item .glyphicon {
    display: block !important;
    font-size: 22px !important;
    line-height: 1 !important;
    margin: 0 auto 4px auto !important;
}

/* Texto Soporte Técnico */
.pgje-support-label {
    display: block !important;
    width: 100% !important;
    max-width: 60px !important;
    margin: 2px auto 0 auto !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.05 !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
}

/* Evita que textos largos rompan el menú */
#taskmenu a,
#layout-menu a {
    box-sizing: border-box !important;
}

/* Pantallas con poca altura */
@media (max-height: 720px) {
    .pgje-logo-wrap {
        min-height: 54px !important;
        padding: 3px !important;
    }

    .pgje-sidebar-logo {
        max-width: 38px !important;
        max-height: 40px !important;
    }

    .pgje-support-item {
        min-height: 60px !important;
        padding: 5px 2px !important;
    }

    .pgje-support-item:before,
    .pgje-support-item .icon,
    .pgje-support-item [class*="icon"],
    .pgje-support-item .fa,
    .pgje-support-item .glyphicon {
        font-size: 20px !important;
        margin-bottom: 3px !important;
    }

    .pgje-support-label {
        font-size: 9.8px !important;
        line-height: 1 !important;
        max-width: 56px !important;
    }
}

/* Pantallas muy angostas */
@media (max-width: 600px) {
    .pgje-support-label {
        font-size: 9.5px !important;
    }

    .pgje-sidebar-logo {
        max-width: 36px !important;
        max-height: 38px !important;
    }
}
