/* Launch 15 — Desktop search: match the approved separated mobile search button.
   Scope: modern desktop header only. Preserve the existing TCG selector, query
   input, submit button, and mega-search/dropdown behavior. */
@media (min-width: 992px) {
  #header .sw-v653-search-area .form_search_main.sw-header-search,
  #header .sw-v653-search-area .form_search_main.sw-header-search:focus-within {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 138px minmax(0, 1fr) 52px !important;
    grid-template-rows: 46px !important;
    align-items: stretch !important;
    width: 100% !important;
    height: 48px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Paint the shared field outline above the legacy Catalog Search selector.
     v662 positions that selector at z-index:12; a z-index:4 outline was hidden
     behind its opaque background, leaving broken-looking left/top/bottom edges.
     This is pointer-events:none, so dropdown interaction remains available. */
  #header .sw-v653-search-area .form_search_main.sw-header-search::before {
    content: "";
    position: absolute;
    left: 0;
    right: 52px; /* field ends before the 52px slot (8px gap + 44px CTA) */
    top: 0;
    height: 46px;
    z-index: 30; /* above the selector's z-index:12 so the full outer outline stays visible */
    pointer-events: none;
    box-sizing: border-box;
    border: 1px solid color-mix(in srgb, var(--sw-accent) 46%, var(--sw-border));
    border-radius: 5px;
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--sw-accent) 6%, transparent);
  }
  #header .sw-v653-search-area .form_search_main.sw-header-search:focus-within::before {
    border-color: var(--sw-accent);
    box-shadow: 0 0 0 1px var(--sw-accent);
  }

  #header .sw-v653-search-area .sw-search-game {
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 138px !important;
    min-width: 138px !important;
    height: 46px !important;
    border-radius: 5px 0 0 5px !important;
  }
  #header .sw-v653-search-area .sw-search-game-toggle {
    border-radius: 5px 0 0 5px !important;
  }
  #header .sw-v653-search-area input#input_search_main.input-search {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 46px !important;
    border: 0 !important;
    border-radius: 0 5px 5px 0 !important;
    box-shadow: none !important;
  }

  #header .sw-v653-search-area .sw-v655-search-submit-slot {
    grid-column: 3 !important;
    grid-row: 1 !important;
    position: relative !important;
    display: block !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 46px !important;
    margin: 0 0 0 8px !important;
    padding: 0 !important;
    overflow: visible !important;
  }
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:hover,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:focus,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:focus-visible,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:active {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    height: 46px !important;
    min-height: 46px !important;
    max-height: 46px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--sw-accent) !important;
    border-radius: 5px !important;
    background: var(--sw-accent) !important;
    color: var(--sw-accent-contrast, var(--sw-bg, #071014)) !important;
    box-shadow: none !important;
    float: none !important;
    transform: none !important;
    cursor: pointer !important;
  }
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:hover,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button:focus-visible {
    background: var(--sw-accent2, var(--sw-accent)) !important;
  }
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button i,
  #header .top-search-bar .sw-header-search .sw-v655-search-submit-slot > .sw-v656-search-button i::before {
    color: var(--sw-accent-contrast, var(--sw-bg, #071014)) !important;
  }
}
