﻿/* Combos en celular: la lista como panel a pantalla completa (Scripts/Controles/ComboMovil-1.0.3.js).
   top y height los pone el script con el área que deja el teclado. "html body" gana a los !important de Estilo. */
html body .dropdown-menu.combo-movil-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column;
    overflow: hidden !important;
    background: #fff;
    z-index: 3100 !important;
}

/* Encabezado con el color del menú del sitio: se distingue de la lista y se entiende que es otra pantalla. */
html body .dropdown-menu.combo-movil-panel > .combo-movil-encabezado {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    min-height: 56px;
    padding: 6px 6px 6px 16px;
    background: #101f43;
    color: #fff;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-textos {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-titulo,
html body .dropdown-menu.combo-movil-panel .combo-movil-ayuda {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-titulo {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-ayuda {
    font-size: 13px;
    line-height: 1.3;
    color: rgba(255, 255, 255, .75);
}

html body .dropdown-menu.combo-movil-panel .combo-movil-cerrar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin-left: 8px;
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    font-size: 30px;
    line-height: 1;
    color: #fff;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-cerrar:active {
    background: rgba(255, 255, 255, .15);
}

/* Selección múltiple: "Listo" como botón, para que se vea que hay que tocarlo al terminar. */
html body .dropdown-menu.combo-movil-panel .combo-movil-listo {
    width: auto;
    height: 36px;
    padding: 0 18px;
    border-radius: 18px;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
    color: #101f43;
}

html body .dropdown-menu.combo-movil-panel .combo-movil-listo:active {
    background: #d7dee8;
}

html body .dropdown-menu.combo-movil-panel > .bs-searchbox,
html body .dropdown-menu.combo-movil-panel > .bs-actionsbox,
html body .dropdown-menu.combo-movil-panel > .bs-donebutton {
    flex: 0 0 auto;
    padding: 10px 12px;
    background: #f2f4f7;
    border-bottom: 1px solid #e1e5eb;
}

/* Lupa dentro del filtro. */
html body .dropdown-menu.combo-movil-panel > .bs-searchbox {
    position: relative;
}

html body .dropdown-menu.combo-movil-panel > .bs-searchbox::before {
    content: "\e003";
    position: absolute;
    top: 50%;
    left: 26px;
    margin-top: -8px;
    font-family: 'Glyphicons Halflings';
    font-size: 15px;
    line-height: 16px;
    color: #8a94a3;
    pointer-events: none;
}

/* 16px: con menos, iOS acerca la página al escribir en el filtro. */
html body .dropdown-menu.combo-movil-panel > .bs-searchbox input {
    height: 42px;
    padding-left: 38px;
    border-color: #d0d6de;
    border-radius: 8px;
    font-size: 16px;
}

/* El script lo deja de solo lectura hasta que se toca (así no abre el teclado solo): que no se vea deshabilitado. */
html body .dropdown-menu.combo-movil-panel > .bs-searchbox input[readonly] {
    background-color: #fff;
    cursor: text;
}

html body .dropdown-menu.combo-movil-panel > .inner {
    flex: 1 1 auto;
    max-height: none !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Renglones separados, con espacio a la derecha para la palomita. */
html body .dropdown-menu.combo-movil-panel > .inner > li > a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    padding: 10px 48px 10px 16px;
    border-bottom: 1px solid #edf0f4;
    font-size: 15px;
    color: #222;
    white-space: normal;
    outline: none;
}

html body .dropdown-menu.combo-movil-panel > .inner > li > a:hover,
html body .dropdown-menu.combo-movil-panel > .inner > li > a:focus {
    background: transparent;
    color: #222;
}

html body .dropdown-menu.combo-movil-panel > .inner > li > a:active {
    background: #e6e9ee;
}

/* Teclado físico: la opción enfocada o la que toma Enter al filtrar (bootstrap-select la marca .active). */
html body .dropdown-menu.combo-movil-panel > .inner > li > a:focus-visible,
html body .dropdown-menu.combo-movil-panel > .inner > li.active:not(.selected) > a {
    background: #f2f4f7;
    color: #222;
}

html body .dropdown-menu.combo-movil-panel > .inner > li > a > .text {
    flex: 1 1 auto;
    min-width: 0;
    margin-right: 0;
}

/* Icono de la opción (data-icon). */
html body .dropdown-menu.combo-movil-panel > .inner > li > a > .glyphicon:not(.check-mark),
html body .dropdown-menu.combo-movil-panel > .inner > li > a > .fa {
    flex: 0 0 auto;
    margin-right: 10px;
}

/* El subtexto (data-subtext) en su propio renglón; gris también en la elegida (bootstrap-select lo pone blanco en .active). */
html body .dropdown-menu.combo-movil-panel > .inner > li > a > .text > small {
    display: block;
    padding-left: 0;
    margin-top: 2px;
    font-size: 13px;
    color: #6b7684;
}

/* La opción vacía del combo ("ninguna"): sin esto es un renglón en blanco. */
html body .dropdown-menu.combo-movil-panel > .inner > li > a > .text:empty::before {
    content: "No hay selección";
    font-style: italic;
    color: #888;
}

/* Elegida: fondo azul claro, barra a la izquierda y palomita a la derecha (en vez de la franja azul de Bootstrap). */
html body .dropdown-menu.combo-movil-panel > .inner > li.selected > a {
    background: #eaf2fb;
    box-shadow: inset 4px 0 0 #337ab7;
    font-weight: 600;
    color: #101f43;
}

html body .dropdown-menu.combo-movil-panel > .inner > li.selected > a > .text > small {
    font-weight: normal;
}

html body .dropdown-menu.combo-movil-panel > .inner > li > a > .check-mark {
    display: none !important;
}

html body .dropdown-menu.combo-movil-panel > .inner > li.selected > a > .check-mark {
    position: absolute;
    top: 50%;
    right: 16px;
    display: inline-block !important;
    margin-top: -9px;
    font-size: 18px;
    line-height: 18px;
    color: #337ab7;
}

/* Selección múltiple: casillas a la izquierda, así se ve que se pueden elegir varias. */
html body .dropdown-menu.combo-movil-panel.combo-movil-multiple > .inner > li > a {
    padding-left: 54px;
    padding-right: 16px;
}

html body .dropdown-menu.combo-movil-panel.combo-movil-multiple > .inner > li > a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 16px;
    width: 22px;
    height: 22px;
    margin-top: -11px;
    border: 2px solid #9aa5b4;
    border-radius: 4px;
    background: #fff;
    font-family: 'Glyphicons Halflings';
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    color: #fff;
}

html body .dropdown-menu.combo-movil-panel.combo-movil-multiple > .inner > li.selected > a {
    background: #f3f8fd;
    box-shadow: none;
}

html body .dropdown-menu.combo-movil-panel.combo-movil-multiple > .inner > li.selected > a::before {
    content: "\e013";
    border-color: #337ab7;
    background: #337ab7;
}

html body .dropdown-menu.combo-movil-panel.combo-movil-multiple > .inner > li.selected > a > .check-mark {
    display: none !important;
}

html body .dropdown-menu.combo-movil-panel > .inner > li.disabled > a {
    color: #aaa;
}

html body .dropdown-menu.combo-movil-panel > .inner > li.dropdown-header {
    padding: 8px 16px;
    background: #f7f9fc;
    border-bottom: 1px solid #edf0f4;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #5b6675;
}

html body .dropdown-menu.combo-movil-panel > .inner > li.no-results {
    margin: 0;
    padding: 32px 16px;
    background: transparent;
    font-size: 15px;
    text-align: center;
    white-space: normal;
    color: #777;
}

html.combo-movil-abierto,
html.combo-movil-abierto body {
    overflow: hidden !important;
}
