/* jQuery Nice Select — theme styling with RTL + LTR support */

.nice-select {
    -webkit-tap-highlight-color: transparent;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dfe3e9;
    box-sizing: border-box;
    clear: both;
    cursor: pointer;
    display: block;
    float: left;
    font-family: inherit;
    font-size: 14px;
    font-weight: normal;
    height: 44px;
    line-height: 42px;
    outline: none;
    padding-left: 16px;
    padding-right: 40px;
    position: relative;
    text-align: left;
    transition: all 0.15s ease-in-out;
    -webkit-user-select: none;
    user-select: none;
    white-space: nowrap;
    width: auto;
    color: #3b4452;
}

.nice-select:hover {
    border-color: #c7cdd6;
}

.nice-select:active,
.nice-select.open,
.nice-select:focus {
    border-color: #297cbb;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, .12);
}

/* Caret */
.nice-select:after {
    border-bottom: 2px solid #9aa2af;
    border-right: 2px solid #9aa2af;
    content: '';
    display: block;
    height: 7px;
    margin-top: -5px;
    pointer-events: none;
    position: absolute;
    right: 16px;
    top: 50%;
    transform-origin: 66% 66%;
    transform: rotate(45deg);
    transition: all 0.15s ease-in-out;
    width: 7px;
}

.nice-select.open:after {
    transform: rotate(-135deg);
}

.nice-select.open .list {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1) translateY(0);
}

.nice-select.disabled {
    border-color: #ededed;
    color: #999;
    pointer-events: none;
}

.nice-select.disabled:after {
    border-color: #cccccc;
}

/* The current value — never crop it */
.nice-select .current {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Full width when applied to block-level fields */
.nice-select.wide,
.nice-select.guide-filter-select,
.nice-select.guide-sort-select {
    width: 100%;
    float: none;
}

.nice-select .list {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(68, 68, 68, 0.06), 0 8px 24px rgba(26, 43, 72, 0.14);
    box-sizing: border-box;
    margin-top: 6px;
    opacity: 0;
    overflow: hidden;
    overflow-y: auto;
    max-height: 280px;
    padding: 6px 0;
    pointer-events: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    transform-origin: 50% 0;
    transform: scale(0.82) translateY(-8px);
    transition: all 0.2s cubic-bezier(0.5, 0, 0, 1.25), opacity 0.15s ease-out;
    z-index: 1000;
    width: 100%;
}

.nice-select .list::-webkit-scrollbar {
    width: 8px;
}

.nice-select .list::-webkit-scrollbar-thumb {
    background: #d5dae1;
    border-radius: 8px;
}

.nice-select .option {
    cursor: pointer;
    font-weight: 400;
    line-height: 1.4;
    list-style: none;
    min-height: 38px;
    outline: none;
    padding: 9px 16px;
    text-align: left;
    transition: background-color 0.12s ease;
    /* Allow wrapping so long option text is never cropped */
    white-space: normal;
    word-break: break-word;
}

.nice-select .option:hover,
.nice-select .option.focus,
.nice-select .option.selected.focus {
    background-color: #eef4fb;
}

.nice-select .option.selected {
    color: #297cbb;
    font-weight: 600;
}

.nice-select .option.disabled {
    background-color: transparent;
    color: #b9bfc9;
    cursor: default;
}

/* ===========================  RTL  =========================== */
.is-rtl .nice-select,
[dir="rtl"] .nice-select {
    float: right;
    padding-left: 40px;
    padding-right: 16px;
    text-align: right;
    direction: rtl;
}

.is-rtl .nice-select.wide,
.is-rtl .nice-select.guide-filter-select,
.is-rtl .nice-select.guide-sort-select,
[dir="rtl"] .nice-select.wide,
[dir="rtl"] .nice-select.guide-filter-select,
[dir="rtl"] .nice-select.guide-sort-select {
    float: none;
}

.is-rtl .nice-select:after,
[dir="rtl"] .nice-select:after {
    right: auto;
    left: 16px;
}

.is-rtl .nice-select .list,
[dir="rtl"] .nice-select .list {
    left: 0;
    right: 0;
}

.is-rtl .nice-select .option,
[dir="rtl"] .nice-select .option {
    text-align: right;
    direction: rtl;
}
