/* Frest position-relative wrapper؛ برای فیلترهای کوچک و فرم‌های دارای بازخورد. */
.moonbook-select-wrap {
    position: relative;
    min-width: 0;
}

.moonbook-select-wrap.has-select2-error .select2-selection,
.select2-container.is-invalid .select2-selection {
    border-color: #ff3e1d !important;
}

.moonbook-select-wrap.has-select2-error + .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: .25rem;
    color: #ff3e1d;
    font-size: .875em;
}

/* سایت عمومی Bootstrap را بارگذاری نمی‌کند. */
.moonbook-public .invalid-feedback {
    display: none;
}

/* Select2 فراست در سایت عمومی نیز از رنگ‌های تیرهٔ خود مون‌بوک پیروی کند. */
.moonbook-public .select2-container--default .select2-selection--single,
.moonbook-public .select2-container--default .select2-selection--multiple {
    min-height: 38px;
    height: auto;
    border: 1px solid #303946;
    border-radius: 8px;
    background: #0b1018;
    color: #eef0f3;
    font: inherit;
}

.moonbook-public .select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #eef0f3;
    line-height: 36px;
    font-size: 12px;
}

.moonbook-public .select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #a7aeba;
}

.moonbook-public .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
}

/* Frest's arrow image is otherwise scoped only to .light-style/.dark-style. */
.moonbook-public .select2-container--default .select2-selection--single .select2-selection__arrow b {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23a7aeba' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>");
}

.moonbook-public .select2-container--default.select2-container--disabled .select2-selection {
    opacity: .55;
    cursor: not-allowed;
}

.moonbook-public .select2-container--default.select2-container--focus .select2-selection,
.moonbook-public .select2-container--default.select2-container--open .select2-selection {
    border-color: #9744f3;
    box-shadow: 0 0 0 2px rgba(151, 68, 243, .12);
    outline: none;
}

.moonbook-public .select2-dropdown {
    border: 1px solid #394250;
    border-radius: 8px;
    background: #111822;
    color: #eef0f3;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45);
}

.moonbook-public .select2-search--dropdown .select2-search__field {
    box-sizing: border-box;
    border: 1px solid #394250;
    border-radius: 6px;
    background: #080d14;
    color: #eef0f3;
    font: inherit;
    outline: none;
}

.moonbook-public .select2-container--default .select2-results__option {
    padding: 7px 10px;
    color: #eef0f3;
    font-size: 12px;
}

.moonbook-public .select2-container--default .select2-results__option[aria-selected=true] {
    background: #252c3a !important;
    color: #eef0f3 !important;
}

.moonbook-public .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: #7940b4 !important;
    color: #fff !important;
}

.moonbook-public .select2-container--open {
    z-index: 10001;
}

.moonbook-public .search-filters .moonbook-select-wrap {
    min-width: 130px;
}

.moonbook-public .user-ticket-form .select2-selection--single {
    min-height: 43px;
}

.moonbook-public .user-ticket-form .select2-selection--single .select2-selection__rendered {
    line-height: 41px;
}

.moonbook-public .user-ticket-form .select2-selection--single .select2-selection__arrow {
    height: 41px;
}

.moonbook-public .library-actions .moonbook-select-wrap {
    width: 145px;
    max-width: 100%;
}

.moonbook-public .library-folder-view .library-actions .moonbook-select-wrap {
    width: 230px;
}

/* DataTables places the page-size select inside an inline label. */
.dataTables_length .moonbook-select-wrap {
    display: inline-block;
    width: 4.5rem;
    vertical-align: middle;
}

.manhwa-table-heading .moonbook-select-wrap {
    width: 10rem;
    max-width: 100%;
}
