/* UBC pilot responsive service search — batch 202K.
   Reuses the stable single search component. Pilot pages only. */

.ubc-pilot-mobile-search-overlay,
.ubc-pilot-mobile-search-toggle,
.ubc-pilot-desktop-search-host { display: none; }

/* Reordered component: category + is always the first control at the left
   edge, then the input, then the submit pill. */
body.ubc-pilot-search-201 .ubc-menu-search-category {
  order: 1 !important;
}
body.ubc-pilot-search-201 .ubc-menu-search-input {
  order: 2 !important;
}
body.ubc-pilot-search-201 .ubc-menu-search-submit {
  order: 3 !important;
}

@media (max-width: 900px) {
  body.ubc-pilot-search-201 .ubc-menu-search,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 .ubc-menu-search,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 .main-nav-wrap.menu-open .ubc-menu-search {
    grid-template-columns: 28px minmax(0, 1fr) auto !important;
    padding: 5px 5px 5px 7px !important;
  }

  /* Dedicated quick-search control immediately left of hamburger. */
  body.ubc-pilot-search-201 .header-brand-row .ubc-pilot-mobile-search-toggle {
    position: absolute !important;
    top: 50% !important;
    right: 49px !important;
    z-index: 6101 !important;
    display: flex !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: translateY(-50%) !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #00009F !important;
    cursor: pointer !important;
    touch-action: manipulation;
  }
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-toggle svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-toggle:active,
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-toggle[aria-expanded="true"] {
    color: #F28C00 !important;
  }

  /* Quick search is a true overlay under the sticky progress rule. Removing
     the search bundle from its normal home does not collapse page geometry;
     JS keeps the original zone height as a placeholder. */
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-overlay {
    position: fixed !important;
    top: var(--ubc-pilot-mobile-sticky-height, 93px) !important;
    left: var(--ubc-pilot-mobile-sticky-left, 10px) !important;
    z-index: 6200 !important;
    display: block !important;
    width: var(--ubc-pilot-mobile-sticky-width, calc(100% - 20px)) !important;
    box-sizing: border-box !important;
    padding: 8px 7px 10px !important;
    transform: translateY(-4px) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    background-color: #f6f7f8 !important;
    background-image: url("../image/mobile-header-silver-gradient.svg") !important;
    background-repeat: no-repeat !important;
    background-position: center top !important;
    background-size: 100% 100% !important;
    box-shadow: 0 7px 15px rgba(0,0,0,.07) !important;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s !important;
  }
  body.ubc-pilot-search-201.ubc-pilot-mobile-search-overlay-open .ubc-pilot-mobile-search-overlay {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transition: opacity .18s ease, transform .18s ease !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-overlay .ubc-mobile-search-bundle {
    width: 100% !important;
  }
  body.ubc-pilot-search-201 .ubc-mobile-search-zone.ubc-pilot-search-home-placeholder {
    box-sizing: border-box !important;
  }

  /* Category +: no circle/contour, left edge, full 38px touch height. */
  body.ubc-pilot-search-201 .ubc-menu-search-category,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 .ubc-menu-search-category {
    width: 28px !important;
    min-width: 28px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: #00009F !important;
    font-size: 28px !important;
    line-height: 38px !important;
  }

  /* Calm state: silver SVG inner pill, no contour. */
  body.ubc-pilot-search-201 .ubc-menu-search-submit,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 button.ubc-menu-search-submit,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 button.ubc-menu-search-submit-premium {
    width: clamp(108px, 31vw, 140px) !important;
    min-width: 38px !important;
    max-width: 140px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 11px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: #e3e5e8 !important;
    background-image: url("../image/mobile-search-button-silver.svg") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 100% 100% !important;
    box-shadow: none !important;
    color: #00009F !important;
    text-shadow: none !important;
    transform: none !important;
    transition: width .18s ease, padding .18s ease, background-color .18s ease, color .18s ease !important;
  }
  body.ubc-pilot-search-201 .ubc-menu-search-submit:active,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 button.ubc-menu-search-submit-premium:active {
    transform: none !important;
    box-shadow: none !important;
  }
  body.ubc-pilot-search-201 .ubc-menu-search-submit-text {
    display: inline-block !important;
    max-width: 112px !important;
    overflow: hidden !important;
    opacity: 1 !important;
    white-space: nowrap !important;
    transition: max-width .16s ease, opacity .12s ease !important;
  }

  /* Once the user starts typing, the mobile submit pill collapses to a
     corporate-blue circle with a white magnifier. */
  body.ubc-pilot-search-201 .ubc-pilot-search-has-query .ubc-menu-search-submit,
  html.ubc-menu-ui-compact body.ubc-pilot-search-201 .ubc-pilot-search-has-query button.ubc-menu-search-submit-premium {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background-color: #00009F !important;
    background-image: none !important;
    color: #fff !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-search-has-query .ubc-menu-search-submit-text {
    max-width: 0 !important;
    opacity: 0 !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-search-has-query .ubc-menu-search-magnifier {
    width: 20px !important;
    min-width: 20px !important;
    height: 20px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-search-has-query .ubc-menu-search-magnifier svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Desktop pilot: search occupies the H1 line on the right. JS measures its
   left edge from the separator immediately before Support and its right edge
   from the main content grid, so the field follows the historical layout. */
@media (min-width: 901px) {
  body.ubc-pilot-search-201 #main-content {
    position: relative !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host {
    position: absolute !important;
    z-index: 80 !important;
    display: block !important;
    height: 44px !important;
    overflow: visible !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-mobile-search-bundle {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    height: 44px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 30px minmax(0, 1fr) auto !important;
    gap: 5px !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    align-items: center !important;
    box-sizing: border-box !important;
    padding: 3px 4px 3px 7px !important;
    overflow: hidden !important;
    border: 1px solid #b9bec7 !important;
    border-radius: 22px !important;
    background: #DCDCDC !important;
    box-shadow: 0 1px 4px rgba(0,0,0,.06) !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search:focus-within {
    border-color: #00009F !important;
    box-shadow: 0 1px 5px rgba(0,0,159,.10) !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-category {
    display: flex !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 36px !important;
    min-height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #00009F !important;
    font-size: 27px !important;
    font-weight: 500 !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-input {
    width: 100% !important;
    min-width: 0 !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 4px 0 0 !important;
    border: 0 !important;
    outline: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #222 !important;
    font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif !important;
    font-size: 15px !important;
    line-height: 36px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-submit {
    display: inline-flex !important;
    width: auto !important;
    min-width: 124px !important;
    height: 36px !important;
    min-height: 36px !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin: 0 !important;
    padding: 0 13px !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: 999px !important;
    outline: 0 !important;
    background: #e3e5ed url("../menu.png") repeat-x center / auto 100% !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.12) !important;
    color: #00009F !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
    text-shadow: none !important;
    transform: translateY(0) !important;
    transition: transform .16s ease, box-shadow .16s ease, filter .16s ease !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-pilot-search-has-query .ubc-menu-search-submit {
    background: #e3e5ed url("../menu.png") repeat-x center / auto 100% !important;
    color: #00009F !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-magnifier,
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-magnifier svg {
    width: 18px !important;
    min-width: 18px !important;
    height: 18px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-magnifier svg {
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-category-status {
    position: absolute !important;
    top: 46px !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 82 !important;
    padding: 3px 12px 0 !important;
    background: #fff !important;
    color: #555b65 !important;
    font-size: 11px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-category-popover,
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-results {
    position: absolute !important;
    top: 48px !important;
    right: 0 !important;
    left: 0 !important;
    z-index: 83 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-height: min(52vh, 390px) !important;
    overflow-y: auto !important;
    border: 1px solid #c7cbd1 !important;
    border-radius: 4px !important;
    background: #fff !important;
    box-shadow: 0 8px 22px rgba(0,0,0,.10) !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-category-popover {
    display: none !important;
    padding: 5px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-category-open .ubc-menu-search-category-popover {
    display: grid !important;
    gap: 4px !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-category-option {
    display: block !important;
    width: 100% !important;
    padding: 7px 9px !important;
    border: 0 !important;
    border-bottom: 1px solid #e3e5e8 !important;
    background: #fff !important;
    color: #242a31 !important;
    text-align: left !important;
    cursor: pointer !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-results {
    display: none !important;
    padding: 0 !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-search-has-results > .ubc-menu-search-results {
    display: block !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result {
    display: block !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid #e5e7ea !important;
    background: #fff !important;
    color: #20252b !important;
    text-decoration: none !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result:last-child {
    border-bottom: 0 !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result strong,
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result span {
    display: block !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result strong {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-result span {
    margin-top: 2px !important;
    color: #6a7078 !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-empty {
    padding: 10px !important;
    color: #666c74 !important;
    font-size: 12px !important;
  }
}

@media (min-width: 901px) and (hover: hover) and (pointer: fine) {
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-submit:hover {
    background: #e3e5ed url("../menu.png") repeat-x center / auto 100% !important;
    box-shadow: 0 3px 7px rgba(0,0,0,.18) !important;
    filter: brightness(1.025);
    transform: translateY(-1px) !important;
  }
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-submit:active {
    box-shadow: 0 1px 2px rgba(0,0,0,.12) !important;
    filter: none;
    transform: translateY(0) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.ubc-pilot-search-201 .ubc-pilot-mobile-search-overlay,
  body.ubc-pilot-search-201 .ubc-menu-search-submit,
  body.ubc-pilot-search-201 .ubc-menu-search-submit-text {
    transition: none !important;
  }
}


/* Pilot 205K: SVG-only category/search controls and unified orange desktop hover. */
body.ubc-pilot-search-201 .ubc-menu-search-category .ubc-pilot-category-plus-svg {
  display:block !important; width:19px !important; height:19px !important; fill:none !important;
  stroke:currentColor !important; stroke-width:2 !important; stroke-linecap:round !important;
}
@media (max-width:900px) {
  body.ubc-pilot-search-201 .ubc-menu-search-category .ubc-pilot-category-plus-svg { width:19px !important; height:19px !important; }
}
@media (min-width:901px) and (hover:hover) and (pointer:fine) {
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-category:hover,
  body.ubc-pilot-search-201 .ubc-pilot-desktop-search-host .ubc-menu-search-submit:hover { color:#F28C00 !important; }
}

/* Search category close marker: visible text x in desktop and mobile. */
body.ubc-pilot-search-201 .ubc-menu-search-category .ubc-search-category-close{
  display:grid!important;
  place-items:center!important;
  width:16px!important;
  height:16px!important;
  margin:0!important;
  padding:0!important;
  color:currentColor!important;
  font-family:Arial,Helvetica,sans-serif!important;
  font-size:16px!important;
  font-weight:700!important;
  line-height:16px!important;
  text-align:center!important;
}



/* KVED 2026-09-22: site-search 32/24/16 standard. */
@media (max-width:900px){
  body.kved-pilot-205 .ubc-menu-search,
  html.ubc-menu-ui-compact body.kved-pilot-205 .ubc-menu-search,
  html.ubc-menu-ui-compact body.kved-pilot-205 .main-nav-wrap.menu-open .ubc-menu-search{
    grid-template-columns:24px minmax(0,1fr) 24px!important;height:32px!important;min-height:32px!important;max-height:32px!important;padding:3px 4px!important;gap:4px!important;border-radius:16px!important;
  }
  body.kved-pilot-205 .ubc-menu-search-category,
  body.kved-pilot-205 .ubc-menu-search-submit,
  html.ubc-menu-ui-compact body.kved-pilot-205 button.ubc-menu-search-submit-premium{
    width:24px!important;min-width:24px!important;max-width:24px!important;height:24px!important;min-height:24px!important;max-height:24px!important;padding:0!important;border-radius:50%!important;
  }
  body.kved-pilot-205 .ubc-menu-search-input{height:24px!important;min-height:24px!important;max-height:24px!important;line-height:24px!important;font-size:16px!important;padding:0 2px!important;}
  body.kved-pilot-205 .ubc-menu-search-category svg,
  body.kved-pilot-205 .ubc-menu-search-magnifier,
  body.kved-pilot-205 .ubc-menu-search-magnifier svg{width:16px!important;min-width:16px!important;height:16px!important;max-height:16px!important;}
  body.kved-pilot-205 .ubc-menu-search-submit-text{display:none!important;}
}
