/* Protek standard dropdowns - see /scripts/protekSelect.js */

/* Closed box: standard width, never wider than the screen.
   Long text ends in "..." (jQuery UI base theme); the full text shows on hover. */
.protek-select-button.ui-selectmenu-button {
    width: 35em;
    max-width: 90vw;
    box-sizing: border-box;
    vertical-align: middle;
}

/* Open list: never wider than the screen, scrolls up/down, long options wrap onto several lines.
   max-width overrides the inline width jQuery UI sets from the longest option. */
.protek-select-menu .ui-menu {
    max-width: min(60em, 90vw);
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.protek-select-menu .ui-menu .ui-menu-item-wrapper {
    white-space: normal;
    overflow-wrap: break-word;
    line-height: 1.3;
    padding: 4px 8px;
}
