/* bmselect.css — giao diện dropdown thay cho <select> (xem js/bmselect.js). Chỉnh màu bằng biến --bms-* */
:root { --bms-accent: var(--color-title, #f0b30b); --bms-border: #d9dde3; --bms-radius: 8px; --bms-h: 40px; }
.bmsel-source { position: absolute !important; opacity: 0 !important; pointer-events: none !important; width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); }
.bmsel { position: relative; display: inline-block; vertical-align: middle; min-width: 140px; width: 100%; text-align: left; }
.bmsel-block { display: block; width: 100%; }
.bmsel-btn { width: 100%; min-height: var(--bms-h); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 12px; font: inherit; font-size: 14px; color: #222; background: #fff; border: 1px solid var(--bms-border); border-radius: var(--bms-radius); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.bmsel-btn:hover { border-color: #b9bfc8; }
.bmsel-btn:focus-visible, .bmsel.is-open .bmsel-btn { outline: 0; border-color: var(--bms-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bms-accent) 25%, transparent); }
.bmsel-btn.is-placeholder .bmsel-label { color: #8b93a0; }
.bmsel-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmsel-arrow { flex: none; width: 8px; height: 8px; margin-top: -3px; border-right: 2px solid #777; border-bottom: 2px solid #777; transform: rotate(45deg); transition: transform .2s; }
.bmsel.is-open .bmsel-arrow { transform: rotate(-135deg); margin-top: 3px; }
.bmsel.is-disabled .bmsel-btn { background: #f3f4f6; color: #9aa1ab; cursor: not-allowed; }
.was-validated .bmsel.is-invalid .bmsel-btn { border-color: #dc3545; }
.bmsel-panel { position: absolute; z-index: 1056; left: 0; right: 0; top: calc(100% + 4px); display: none; min-width: 100%; width: max-content; max-width: min(92vw, 420px); background: #fff; border: 1px solid var(--bms-border); border-radius: var(--bms-radius); box-shadow: 0 12px 32px rgba(20, 30, 60, .16); overflow: hidden; }
.bmsel.is-open .bmsel-panel { display: block; animation: bmselIn .12s ease-out; }
.bmsel.is-up .bmsel-panel { top: auto; bottom: calc(100% + 4px); }
@keyframes bmselIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.bmsel-search { display: block; width: calc(100% - 16px); margin: 8px; padding: 7px 10px; font-size: 14px; border: 1px solid var(--bms-border); border-radius: 6px; outline: 0; }
.bmsel-search:focus { border-color: var(--bms-accent); }
.bmsel-list { list-style: none; margin: 0; padding: 4px; max-height: 260px; overflow-y: auto; }
.bmsel-opt { padding: 8px 10px; font-size: 14px; line-height: 1.35; color: #222; border-radius: 6px; cursor: pointer; }
.bmsel-opt.is-active { background: color-mix(in srgb, var(--bms-accent) 14%, #fff); }
.bmsel-opt.is-selected { font-weight: 700; color: var(--bms-accent); }
.bmsel-opt.is-placeholder { color: #8b93a0; }
.bmsel-opt.is-disabled { color: #b5bbc4; cursor: not-allowed; }
/* vừa với các ô nhập khác trong form giỏ hàng / tài khoản */
.cart-page .bmsel-btn, .acc-form .bmsel-btn { min-height: 44px; }
.pl-tools .bmsel { min-width: 170px; }
.pl-tools .bmsel-btn { min-height: 34px; font-size: 14px; padding: 4px 10px; }
@media (max-width: 575px) { .bmsel-panel { max-width: 92vw; } .bmsel-list { max-height: 220px; } }
