/* =========================================================
   Shared select / dropdown theme
   Keeps native selects, Chosen selects and Bootstrap
   dropdown menus visually consistent across the project.
   ========================================================= */

/* ---------- Native selects ---------- */
select:not([multiple]):not([size]) {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    min-height: 44px;
    padding: 9px 38px 9px 13px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23607d8b' d='M1.41 0L6 4.59 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    background-size: 12px 8px;
    color: var(--app-ink, #0f2036);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: none;
    vertical-align: middle;
}

select:not([multiple]):not([size]):focus {
    outline: 0;
    border-color: #1e88e5;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .12);
}

select:not([multiple]):not([size]):disabled {
    background-color: #f5f7fa;
    color: #90a4ae;
    cursor: not-allowed;
}

/* Keep DataTables length selects compact */
html body div.dataTables_wrapper div.dataTables_length select {
    min-height: 38px;
}

/* ---------- Chosen single ---------- */
.chosen-container {
    font-size: 14px;
}

.chosen-container-single .chosen-single {
    height: 44px;
    min-height: 44px;
    line-height: 42px;
    padding: 0 36px 0 13px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    background: #fff;
    color: var(--app-ink, #0f2036);
    box-shadow: none;
}

.chosen-container-single .chosen-single div {
    right: 14px !important;
    width: 14px !important;
}

/* Higher specificity than Chosen's retina sprite media query. */
html body .chosen-container-single .chosen-single div b {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23607d8b' d='M1.41 0L6 4.59 10.59 0 12 1.41 6 7.41 0 1.41z'/%3E%3C/svg%3E") !important;
    background-position: right 0 center !important;
    background-repeat: no-repeat !important;
    background-size: 12px 8px !important;
}

html body .chosen-container-single .chosen-single abbr {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23607d8b' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 10px 10px !important;
}

html body .chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%231565c0' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='5' y1='5' x2='19' y2='19'/%3E%3Cline x1='19' y1='5' x2='5' y2='19'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 10px 10px !important;
}

/* Chosen search field: centered magnifier with right-side breathing room */
.chosen-container .chosen-drop .chosen-search {
    padding: 10px !important;
    border-bottom: 1px solid #eef3f9;
}

html body .chosen-container-single .chosen-search input[type="text"] {
    width: 100% !important;
    height: 38px !important;
    margin: 0 !important;
    padding: 8px 40px 8px 12px !important;
    border: 1px solid #dbe6f1 !important;
    border-radius: 8px !important;
    background-color: #fff !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23607d8b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") !important;
    background-position: right 13px center !important;
    background-repeat: no-repeat !important;
    background-size: 15px 15px !important;
    box-shadow: none !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
}

.chosen-container-single .chosen-search input[type="text"]:focus {
    outline: 0 !important;
    border-color: #1e88e5 !important;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, .12) !important;
}

.chosen-container-active .chosen-single,
.chosen-container-single .chosen-single:focus {
    border-color: #1e88e5;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .12);
}

.chosen-container .chosen-drop {
    margin-top: 6px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(15, 32, 54, .14);
    overflow: hidden;
}

.chosen-container .chosen-results {
    max-height: 260px;
    padding: 6px;
    margin: 0;
}

.chosen-container .chosen-results li {
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--app-ink, #0f2036);
}

.chosen-container .chosen-results li.highlighted {
    background: #e3f2fd;
    color: #1565c0;
}

.chosen-container .chosen-results li.result-selected {
    color: #1565c0;
    font-weight: 600;
}

/* ---------- Chosen multiple ---------- */
.chosen-container-multi .chosen-choices {
    min-height: 44px;
    padding: 5px 10px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    background: #fff;
    box-shadow: none;
}

.chosen-container-multi.chosen-container-active .chosen-choices {
    border-color: #1e88e5;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, .12);
}

.chosen-container-multi .chosen-choices li.search-field input[type="text"] {
    height: 30px;
    margin: 0;
    color: var(--app-ink, #0f2036);
    font-size: 14px;
    font-family: inherit;
}

.chosen-container-multi .chosen-choices li.search-choice {
    margin: 3px 5px 3px 0;
    padding: 5px 24px 5px 10px;
    border: 1px solid #90caf9;
    border-radius: 999px;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: none;
}

.chosen-container-multi .chosen-choices li.search-choice .search-choice-close {
    top: 8px;
    right: 8px;
}

/* ---------- Bootstrap dropdown menus inside admin content ---------- */
.att-page .dropdown-menu,
.mdk-drawer-layout__content .dropdown-menu {
    padding: 6px;
    border: 1px solid #dbe6f1;
    border-radius: 10px;
    box-shadow: 0 16px 34px rgba(15, 32, 54, .14);
    font-size: 14px;
}

.att-page .dropdown-menu .dropdown-item,
.mdk-drawer-layout__content .dropdown-menu .dropdown-item {
    padding: 8px 12px;
    border-radius: 8px;
    color: var(--app-ink, #0f2036);
    font-size: 13.5px;
}

.att-page .dropdown-menu .dropdown-item:hover,
.att-page .dropdown-menu .dropdown-item:focus,
.mdk-drawer-layout__content .dropdown-menu .dropdown-item:hover,
.mdk-drawer-layout__content .dropdown-menu .dropdown-item:focus {
    background: #e3f2fd;
    color: #1565c0;
}

.att-page .dropdown-menu .dropdown-item.disabled,
.mdk-drawer-layout__content .dropdown-menu .dropdown-item.disabled {
    color: #90a4ae;
    background: transparent;
}
