/* Worldiex combobox (JavaScript/game-select.js). Standard for game selects: add data-game-select. */
.gs { position: relative; display: inline-block; vertical-align: middle; max-width: 100%; line-height: 0; font-family: Segoe UI, sans-serif; }
.gs.gs-block { display: block; }
/* Invisible width sizer: keeps the page's width rules for the select, contributes no height. */
.gs-native { vertical-align: top; visibility: hidden !important; height: 0 !important; min-height: 0 !important; margin: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; border-top-width: 0 !important; border-bottom-width: 0 !important; overflow: hidden; pointer-events: none; }
.gs > .ajax-spinner { display: none; }
.gs [hidden], .gs-panel [hidden] { display: none !important; }

.gs-trigger { box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: 0; min-width: 100%; height: 34px; margin: 0; padding: 0 10px 0 12px; border: 1px solid #ffffff59; border-radius: 3px; background: #FFFFFF; color: #006666; font: 600 14px Segoe UI, sans-serif; text-align: left; cursor: pointer; box-shadow: 2px 2px 2px #333333; transition: background-color .15s ease, box-shadow .15s ease; }
.gs-trigger:hover { background: #E6F4F4; }
.gs-trigger:focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.gs-trigger:disabled { opacity: .6; cursor: default; }
.gs-value { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gs-placeholder .gs-value { color: #4D8C8C; font-weight: normal; }
.gs-has-value .gs-trigger { border-color: #006666; box-shadow: 2px 2px 2px #333333, inset 4px 0 0 #00AAAA; }
.gs-arrow { flex: none; width: 7px; height: 7px; margin: -4px 2px 0 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.gs-open .gs-arrow { margin-top: 3px; transform: rotate(225deg); }

.gs-panel { position: fixed; z-index: 1100; box-sizing: border-box; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #ffffff33; border-radius: 3px; background: #006666; color: #FFFFFF; font: 14px Segoe UI, sans-serif; box-shadow: 0 6px 20px #0008; animation: gs-drop .12s ease-out; }
.gs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 6px 6px 16px; border-bottom: 1px solid #ffffff26; }
.gs-title { min-width: 0; overflow: hidden; font-size: 17px; white-space: nowrap; text-overflow: ellipsis; }
.gs-close { flex: none; width: 44px; height: 44px; border: 0; border-radius: 3px; background: transparent; color: #FFFFFF; font-size: 28px; line-height: 1; cursor: pointer; }
.gs-close:hover, .gs-close:focus-visible { background: #077; outline: 2px solid #FFFFFF; outline-offset: -2px; }
.gs-search { box-sizing: border-box; flex: none; width: calc(100% - 16px); height: 34px; margin: 8px; padding: 0 10px; border: 0; border-radius: 3px; background: #FFFFFF; color: #006666; font: 14px Segoe UI, sans-serif; }
.gs-search:focus-visible { outline: 2px solid #00AAAA; outline-offset: 0; }
.gs-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 4px; outline: none; scrollbar-width: thin; scrollbar-color: #00AAAA #005555; }
.gs-list::-webkit-scrollbar { width: 10px; }
.gs-list::-webkit-scrollbar-track { background: #005555; }
.gs-list::-webkit-scrollbar-thumb { background: #00AAAA; }
.gs-group-label { position: sticky; top: 0; z-index: 1; padding: 7px 12px 5px; border-top: 1px solid #ffffff1f; background: #004D4D; color: #8FE3DC; font-size: 11px; font-weight: bold; letter-spacing: .08em; text-transform: uppercase; }
.gs-group:first-child .gs-group-label { border-top: 0; }
.gs-option { position: relative; display: flex; align-items: center; gap: 10px; padding: 8px 34px 8px 12px; cursor: pointer; overflow-wrap: anywhere; }
.gs-text { min-width: 0; }
.gs-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; }
.gs-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
.gs-icon-missing { border-radius: 3px; background: #ffffff1f; }
.gs-trigger .gs-icon-missing { background: #00666626; }
.gs-sheet .gs-icon { width: 24px; height: 24px; }
.gs-group .gs-option { padding-left: 20px; }
.gs-option.gs-active { background: #008080; }
.gs-option[aria-selected="true"] { background: #099; font-weight: 600; }
.gs-option[aria-selected="true"]::after { content: ""; position: absolute; top: 50%; right: 14px; width: 5px; height: 10px; margin-top: -7px; border-right: 2px solid #FFFFFF; border-bottom: 2px solid #FFFFFF; transform: rotate(45deg); }
.gs-option[aria-selected="true"].gs-active { background: #00A3A3; }
.gs-option[aria-disabled="true"] { opacity: .45; cursor: default; }
.gs-option-clear, .gs-option-clear[aria-selected="true"] { background: transparent; color: #CCE8E8; font-weight: normal; font-style: italic; border-bottom: 1px solid #ffffff1f; }
.gs-option-clear[aria-selected="true"]::after { content: none; }
.gs-option-clear.gs-active { background: #008080; }
.gs-empty { padding: 14px 12px; color: #CCE8E8; font-style: italic; text-align: center; }

/* Phones: bottom sheet with large touch targets. */
.gs-backdrop { position: fixed; inset: 0; z-index: 1099; background: #0008; animation: gs-fade .15s ease-out; }
.gs-panel.gs-sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 75vh; max-height: 75dvh; border: 0; border-radius: 12px 12px 0 0; padding-bottom: env(safe-area-inset-bottom); font-size: 16px; animation: gs-sheet .18s ease-out; }
.gs-sheet .gs-search { height: 40px; font-size: 16px; }
.gs-sheet .gs-option { min-height: 44px; box-sizing: border-box; display: flex; align-items: center; padding-top: 10px; padding-bottom: 10px; }
.gs-sheet .gs-group-label { font-size: 12px; padding: 9px 16px 7px; }
.gs-sheet .gs-option { padding-left: 16px; }
.gs-sheet .gs-group .gs-option { padding-left: 26px; }

@keyframes gs-drop { from { opacity: 0; transform: translateY(-4px); } }
@keyframes gs-fade { from { opacity: 0; } }
@keyframes gs-sheet { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) {
    .gs-panel, .gs-panel.gs-sheet, .gs-backdrop { animation: none; }
    .gs-trigger, .gs-arrow { transition: none; }
}

/* AJAX feedback (functions.js marks the select): the arrow turns into the shared spinner. */
.gs-native.ajax-working ~ .gs-trigger .gs-arrow { width: 12px; height: 12px; margin: 0; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; transform: none; animation: ajax-working-spin .7s linear infinite; }

/* Compact variant for the header panels (eat, study, jobs). */
#eat .gs-trigger, #study .gs-trigger, #jobs .gs-trigger { height: 26px; padding: 0 8px; gap: 6px; font-size: 12px; }
#eat .gs-trigger .gs-icon, #study .gs-trigger .gs-icon, #jobs .gs-trigger .gs-icon { width: 16px; height: 16px; }
/* The compact trigger is 11px taller than the old select: pull the panel buttons up to fit the 72px panels. */
#eat .gs + #buttoneat, #study .gs + #buttonstudy { margin-top: 19px; }

/* Registration form: match the 42px inputs. */
#registration .gs-trigger { height: 42px; font-size: 15px; }
