/* Game search styles. Keep every rule inside .game-search to isolate other components. */
.game-search {
    --gs-orange: #c60;
    --gs-teal: #268493;
    --gs-yellow: #efeb88;
    color: #333;
    width: calc(100% - 32px);
    max-width: 980px;
    margin: 2rem auto;
}
/* Keep legacy checkboxes operable by keyboard without displaying the native control. */
.game-search .game-search-option input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.game-search .game-search-option__check { display: none !important; }
.game-search button, .game-search input { font: inherit; }
.game-search button { cursor: pointer; }
.game-search button:disabled { cursor: not-allowed; opacity: .45; }
.game-search button:focus-visible, .game-search input:focus-visible { outline: 3px solid #965000; outline-offset: 3px; }
.game-search .game-search-search-label { display: block; text-align: center; font-size: 1.3rem; font-weight: 700; color: var(--gs-orange); margin-bottom: 1rem; }
.game-search .game-search-search { display: flex; max-width: 740px; margin: 0 auto; border: 2px solid #db8a37; border-radius: 8px; overflow: hidden; background: #fff; }
.game-search .game-search-search:focus-within { box-shadow: 0 0 0 3px #fae6cd; }
.game-search .game-search-search input { appearance: auto; min-width: 0; width: 100%; flex: 1; padding: 14px 18px; border: 0; border-radius: 0; background: #fff; color: #333; font-size: 16px; }
.game-search .game-search-search input:focus-visible { outline-offset: -4px; }
.game-search .game-search-search input::placeholder { color: #777; }
.game-search .game-search-search button { flex-shrink: 0; border: 0; padding: 12px 30px; background: var(--gs-orange); color: #fff; font-weight: 700; }
.game-search .game-search-search button:hover { background: #a65300; }
.game-search .game-search-search button:focus-visible { outline-color: #fff; outline-offset: -5px; }
.game-search .game-search-help { color: #666; font-size: .8rem; line-height: 1.7; text-align: center; margin: .75rem 0 1.5rem; }
.game-search .game-search-facet { border: 0; padding: 0; margin: 1.5rem 0; min-width: 0; width: 100%; }
.game-search .game-search-facet legend { display: block; width: 100%; text-align: center; color: var(--gs-orange); font-weight: 700; margin-bottom: .8rem; }
.game-search .game-search-facet legend span { display: inline-block; margin-left: .75rem; font-size: .75rem; font-weight: 400; color: #666; }
.game-search .game-search-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.game-search .game-search-option { position: relative; display: block; max-width: 100%; padding: 0; margin: 0; border: 0; border-radius: 4px; background: transparent; text-align: center; cursor: pointer; }
.game-search .game-search-option__body { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 12px; min-height: 44px; border: 2px solid transparent; border-radius: 4px; background: var(--gs-yellow); color: #333; font-weight: 700; font-size: .85rem; line-height: 1.4; transition: background-color .15s, border-color .15s; }
.game-search .game-search-option__count { font-size: .75rem; font-weight: 400; white-space: nowrap; }
.game-search .game-search-facet--kind .game-search-option__body { background: #4bb1c0; color: #fff; }
.game-search .game-search-option[aria-pressed="true"] .game-search-option__body,
.game-search .game-search-option input[type="checkbox"]:checked ~ .game-search-option__body { border-color: #8c6710; background: #e3d351; }
.game-search .game-search-facet--kind .game-search-option[aria-pressed="true"] .game-search-option__body,
.game-search .game-search-facet--kind .game-search-option input[type="checkbox"]:checked ~ .game-search-option__body { border-color: #14525c; background: var(--gs-teal); color: #fff; }
.game-search .game-search-option input[type="checkbox"]:focus-visible ~ .game-search-option__body { outline: 3px solid #965000; outline-offset: 3px; }
.game-search .game-search-option:disabled .game-search-option__body,
.game-search .game-search-option input[type="checkbox"]:disabled:not(:checked) ~ .game-search-option__body { background: #eee; border-color: #ddd; color: #888; cursor: not-allowed; }
.game-search .game-search-selection { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; background: #fff9ed; border: 1px solid #eedfc2; border-radius: 6px; }
.game-search .game-search-selection__content { min-width: 0; }
.game-search .game-search-selection strong { display: block; font-size: .8rem; margin-bottom: 8px; color: #8b500e; }
.game-search #game-search-selected { display: flex; flex-wrap: wrap; gap: 6px; font-size: .8rem; overflow-wrap: anywhere; }
.game-search .game-search-chip { display: inline-block; max-width: 100%; border: 1px solid #d8c59e; border-radius: 4px; padding: 5px 9px; color: #59451d; background: #fff; text-align: left; overflow-wrap: anywhere; }
.game-search .game-search-reset { flex-shrink: 0; padding: 6px 0; border: 0; color: #80500e; text-decoration: underline; background: transparent; font-size: .8rem; }
.game-search .game-search-results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 2rem; padding-bottom: 12px; border-bottom: 1px solid #ddd; scroll-margin-top: 100px; }
.game-search #game-search-summary { margin: 0; font-size: .95rem; font-weight: 700; }
.game-search .game-search-results-head > span { font-size: .75rem; color: #777; white-space: nowrap; }
.game-search #game-search-results { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }
.game-search #game-search-results[aria-busy="true"] { opacity: .4; pointer-events: none; }
.game-search .game-search-pager:empty { display: none; }
.game-search .game-search-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 12px; margin: 0; }
.game-search .game-search-grid .cardGame { width: auto; min-width: 0; height: auto; margin: 0; }
.game-search .game-search-grid .cardGame_link { display: block; padding: 0; overflow-wrap: anywhere; }
.game-search .game-search-grid .cardGame_ttl { font-size: .95rem; line-height: 1.6; margin: 8px 0; overflow-wrap: anywhere; }
.game-search .game-search-grid .cardGame_kind { margin: 8px 0 0; }
.game-search .game-search-ad { min-width: 0; overflow: hidden; }
.game-search .game-search-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 5px; margin: 0; }
.game-search .game-search-pagination button { min-width: 38px; min-height: 40px; border: 1px solid #dccfb7; border-radius: 4px; background: #fff; color: #684a23; padding: 5px 9px; }
.game-search .game-search-pagination button[aria-current="page"] { color: #fff; border-color: var(--gs-orange); background: var(--gs-orange); font-weight: 700; }
.game-search .game-search-pagination button:hover:not(:disabled):not([aria-current]) { background: #fff5e5; }
.game-search .game-search-pagination__gap { color: #777; }
.game-search .game-search-empty { grid-column: 1 / -1; padding: 40px 16px; text-align: center; background: #faf8f2; line-height: 1.8; }
.game-search .game-search-error { margin: 16px 0; padding: 16px; color: #932f22; background: #fff1ed; border: 1px solid #ecc6bd; border-radius: 4px; }
.game-search .game-search-error button { margin-left: 12px; border: 1px solid #932f22; background: #fff; padding: 6px 12px; color: inherit; border-radius: 4px; }
@media (max-width: 599px) {
    .game-search .game-search-search input { padding: 12px 10px; }
    .game-search .game-search-search button { padding: 12px 18px; }
    .game-search .game-search-options { gap: 6px; }
    .game-search .game-search-option__body { padding: 8px; font-size: .78rem; }
    .game-search .game-search-selection { align-items: flex-start; flex-direction: column; gap: 8px; }
    .game-search .game-search-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
    .game-search .game-search-grid .cardGame_ttl { font-size: .85rem; }
    .game-search .game-search-pagination { gap: 3px; }
    .game-search .game-search-pagination button { min-width: 30px; min-height: 40px; padding: 4px 6px; font-size: .85rem; }
}
