.panel-search { position: relative; margin: 0; padding: 8px 0; color: #263247; }
.panel-search-bar { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border: 1px solid #c6cfdb; border-radius: 7px; background: #fff; }
.panel-search-bar:focus-within { border-color: #337ab7; box-shadow: 0 0 0 2px #337ab733; }
.panel-search-bar label { margin: 0; }
.panel-search-bar input { flex: 1; min-width: 0; width: 100%; height: 26px; border: 0; outline: 0; background: transparent; color: inherit; font-size: 14px; }
.panel-search-world { font-size: 12px; color: #52627a; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-search-popup { position: absolute; top: 100%; left: 0; width: 100%; z-index: 1100; border: 1px solid #c6cfdb; border-radius: 8px; box-shadow: 0 12px 35px #14213d33; background: #fff; overflow: hidden; }
.panel-search [hidden] { display: none !important; }
.panel-search-toolbar { display: flex; gap: 10px; align-items: center; padding: 12px 14px 6px; }
.panel-search-toolbar label { margin: 0; }
.panel-search-toolbar select { background: #fff; border: 1px solid #c6cfdb; padding: 4px 8px; border-radius: 4px; color: inherit; max-width: 60%; }
#panel-search-close { margin-left: auto; font-size: 24px; line-height: 24px; border: 0; background: transparent; color: inherit; }
.panel-search-help, .panel-search-status { font-size: 12px; margin: 0; padding: 6px 14px; color: #52627a; }
.panel-search-status { padding-bottom: 10px; }
#panel-search-results { max-height: min(58vh, 540px); overflow-y: auto; overscroll-behavior: contain; }
.panel-search-group-title { padding: 7px 14px; background: #f0f3f8; color: #52627a; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: .05em; }
.panel-search-result { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 9px 14px; text-decoration: none !important; color: #263247 !important; }
.panel-search-result img { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.panel-search-result > span { min-width: 0; }
.panel-search-result strong { display: block; font-size: 13px; overflow-wrap: anywhere; }
.panel-search-result small { display: block; position: static; background: transparent; font-size: 12px; color: #52627a; overflow-wrap: anywhere; }
.panel-search-more { width: 100%; text-align: left; padding: 9px 14px; background: transparent; color: #286090; border: 0; font-size: 12px; }
.panel-search [role="option"][aria-selected="true"], .panel-search [role="option"]:focus { background: #e8f2ff; outline: 2px solid #337ab7; outline-offset: -2px; }
.panel-search-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 10px 14px; border-top: 1px solid #e2e7ef; color: #52627a; font-size: 12px; }
.panel-search-footer button { background: #edf1f6; color: #263247; border: 1px solid #c6cfdb; border-radius: 4px; padding: 4px 10px; }
body.black .panel-search { color: #e5eaf3; }
body.black .panel-search-bar, body.black .panel-search-popup, body.black .panel-search-toolbar select { background: #24282f; border-color: #515a67; }
body.black .panel-search-result { color: #e5eaf3 !important; }
body.black .panel-search-world, body.black .panel-search-help, body.black .panel-search-status, body.black .panel-search-result small, body.black .panel-search-footer { color: #b8c4d6; }
body.black .panel-search-group-title, body.black .panel-search-footer button { background: #333b48; color: #d5e0f0; }
body.black .panel-search-more { color: #9dcbff; }
body.black .panel-search [role="option"][aria-selected="true"], body.black .panel-search [role="option"]:focus { background: #284768; }
@media (min-width: 768px) {
    .panel-search-enabled .navbar-fixed-top > .container { position: relative; }
    .panel-search-enabled #navbar { display: flex !important; flex-wrap: wrap; align-items: center; }
    .panel-search-enabled #navbar::before, .panel-search-enabled #navbar::after { display: none; }
    .panel-search-enabled #navbar > .navbar-right { margin-left: auto; }
    .panel-search { position: static; flex: 1 1 0; min-width: 110px; max-width: 320px; padding: 0; margin: 0 12px; }
    .panel-search-popup { left: 15px; right: 15px; width: auto; }
    #panel-search-results.panel-search-results-all { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 8px 0; }
}
@media (min-width: 768px) and (max-width: 1199px) {
    .panel-search-world { display: none; }
}
@media (max-width: 767px) {
    .panel-search-enabled .navbar-fixed-top .navbar-collapse { max-height: calc(100vh - 50px); max-height: calc(100dvh - 50px); }
    .panel-search-popup { position: static; margin-top: 8px; }
    #panel-search-results { max-height: 43vh; max-height: 43dvh; }
}
