/* Developed by XDEYE Digital - https://xdeye.com */
/*
 * Modern dropdowns everywhere (admin and portal), XDEYE style:
 * rounded field, soft border, blue focus, rounded menu with a shadow, a rounded search box, grey group
 * headings, grey subtext, rounded highlighted rows. Plain <select class="form-control"> gets the same field look.
 */

/* ── Closed field: ARROW ONLY. The box (border, radius, height, background,
      colour, hover, focus, disabled) is owned by xdeye-fields.css — not repeated here. ── */
.bootstrap-select > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle.btn-default {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23334155' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E") !important;
    background-position: right 12px center !important;
    background-size: 14px !important;
    background-repeat: no-repeat !important;
    padding-right: 32px !important;
}
.bootstrap-select > .dropdown-toggle.bs-placeholder,
.bootstrap-select > .dropdown-toggle.bs-placeholder .filter-option { color: var(--it-faint); }
.bootstrap-select > .dropdown-toggle .filter-option .fa,
.bootstrap-select > .dropdown-toggle .filter-option .glyphicon { color: var(--it-muted); margin-right: 4px; }
/* The arrow is drawn on the field itself (above); the old caret is hidden. */
.bootstrap-select > .dropdown-toggle .bs-caret { visibility: hidden !important; }
.bootstrap-select.open > .dropdown-toggle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%233b82f6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l5-5 5 5'/%3E%3C/svg%3E") !important; }

/* ── Open menu ── */
.bootstrap-select .dropdown-menu {
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, .14) !important;
    padding: 6px !important;
    margin-top: 6px;
}
.bootstrap-select .dropdown-menu.inner { padding: 0 !important; margin: 0; border: 0 !important; box-shadow: none !important; }
.bootstrap-select .dropdown-menu li a {
    border-radius: 8px;
    padding: 8px 10px;
    color: #1e293b !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 500;
    transition: background-color .1s;
}
.bootstrap-select .dropdown-menu li a:hover,
.bootstrap-select .dropdown-menu li a:focus,
.bootstrap-select .dropdown-menu li.active a,
.bootstrap-select .dropdown-menu li.selected a {
    background: #f1f5f9 !important;
    color: #0f172a !important;
}
.bootstrap-select .dropdown-menu li.selected a { font-weight: 600; }
.bootstrap-select .dropdown-menu li a .text-muted,
.bootstrap-select .dropdown-menu li a small {
    color: #64748b !important;
    font-weight: 400;
    margin-left: 6px;
}
.bootstrap-select .dropdown-menu li a .glyphicon.check-mark,
.bootstrap-select .dropdown-menu li a .check-mark { color: #3b82f6; top: 11px; }
.bootstrap-select .dropdown-menu li.disabled a { color: #cbd5e1 !important; }

/* Group headings ("Employees", "Staff") and dividers */
.bootstrap-select .dropdown-menu .dropdown-header {
    padding: 10px 10px 4px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
}
.bootstrap-select .dropdown-menu li.divider { margin: 6px 4px; background: #eef2f7; }

/* Search box */
.bootstrap-select .bs-searchbox { padding: 2px 2px 8px !important; }
.bootstrap-select .bs-searchbox .form-control {
    height: 40px !important;
    border-radius: 10px !important;
    border: 1.5px solid #cbd5e1 !important;
    padding: 6px 12px !important;
    font-size: 14px;
    box-shadow: none !important;
    background: #fff !important;
}
.bootstrap-select .bs-searchbox .form-control:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15) !important;
}
.bootstrap-select .no-results {
    background: #f8fafc !important;
    border-radius: 8px;
    color: #64748b;
    margin: 4px 2px !important;
    padding: 8px 10px !important;
}
/* Select all / Deselect all (multi-selects) */
.bootstrap-select .bs-actionsbox .btn-group button { border-radius: 8px; font-size: 12px; }

/* Thin scrollbar inside long menus */
.bootstrap-select .dropdown-menu.inner::-webkit-scrollbar { width: 8px; }
.bootstrap-select .dropdown-menu.inner::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
.bootstrap-select .dropdown-menu.inner { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }

/* ── Plain <select class="form-control">: ARROW ONLY. The box (border, radius,
      background, colour, hover, focus, disabled) is owned by xdeye-fields.css. ── */
select.form-control:not([multiple]):not([size]):not(.selectpicker) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7.5l5 5 5-5'/%3E%3C/svg%3E");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 10px;
    padding-right: 32px;
}
select.form-control::-ms-expand { display: none; }

/* ── Dark theme: MENU ONLY. The field box follows the theme tokens automatically. ── */
html[data-itheme="dark"] .bootstrap-select .dropdown-menu {
    background: #0f1830 !important;
    border-color: #22304d !important;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .45) !important;
}
html[data-itheme="dark"] .bootstrap-select .dropdown-menu.inner { background: transparent !important; }
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li a { color: #e5ecff !important; }
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li a:hover,
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li a:focus,
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li.active a,
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li.selected a { background: #1a2747 !important; color: #fff !important; }
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li a .text-muted,
html[data-itheme="dark"] .bootstrap-select .dropdown-menu .dropdown-header { color: #94a3c4 !important; }
html[data-itheme="dark"] .bootstrap-select .dropdown-menu li.divider { background: #22304d; }
html[data-itheme="dark"] .bootstrap-select .bs-searchbox .form-control {
    background: #0b1326 !important;
    border-color: #22304d !important;
    color: #e5ecff !important;
}
html[data-itheme="dark"] .bootstrap-select .no-results { background: #0b1326 !important; color: #94a3c4; }
