/* APD 172.0.0 — COMPACT SEARCH SIZE + OPEN STATE PARITY */
@media (min-width:1180px) {
  /* ------------------------------------------------------------------
     Closed sticky search: same visual scale as the reference capture.
     ------------------------------------------------------------------ */
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) {
    height:78px !important;
    min-height:78px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) > .apd5-header-search-row {
    top:0 !important;
    width:560px !important;
    max-width:560px !important;
    height:78px !important;
    min-height:78px !important;
    padding:15px 0 !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search {
    width:560px !important;
    max-width:560px !important;
    height:48px !important;
    min-height:48px !important;
    grid-template-columns:1.64fr 1px 1.48fr 1px 1.02fr 42px !important;
    border:1px solid #dedede !important;
    border-radius:999px !important;
    box-shadow:0 2px 11px rgba(0,0,0,.12) !important;
    overflow:visible !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search[data-context="services"] {
    grid-template-columns:1.48fr 1px 1.36fr 1px 1.28fr 42px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd5-search-field > button:first-child {
    min-height:46px !important;
    height:46px !important;
    padding:0 15px !important;
    gap:8px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search [data-search-field="location"] > button:first-child {
    padding-left:16px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd26-search-leading-icon {
    flex:0 0 22px !important;
    width:22px !important;
    height:22px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd26-search-leading-icon .apd15-nav-svg {
    width:22px !important;
    height:22px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd26-compact-summary {
    display:block !important;
    width:auto !important;
    max-width:none !important;
    min-width:0 !important;
    overflow:visible !important;
    text-overflow:clip !important;
    white-space:nowrap !important;
    color:#222 !important;
    font-size:13px !important;
    line-height:1.2 !important;
    font-weight:600 !important;
    letter-spacing:-.012em !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd5-search-separator {
    height:24px !important;
    background:#ddd !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd5-search-submit {
    width:34px !important;
    min-width:34px !important;
    max-width:34px !important;
    height:34px !important;
    min-height:34px !important;
    margin:0 7px 0 1px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search .apd5-search-submit .apd5-icon {
    width:15px !important;
    height:15px !important;
  }

  /* ------------------------------------------------------------------
     Expanded sticky header after clicking compact search.
     ------------------------------------------------------------------ */
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded {
    height:194px !important;
    min-height:194px !important;
    overflow:visible !important;
    background:#fff !important;
    border-bottom:1px solid #dedede !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded .apd5-header-row {
    width:min(calc(100vw - 96px),1680px) !important;
    max-width:1680px !important;
    height:92px !important;
    min-height:92px !important;
    grid-template-columns:220px minmax(700px,1fr) 300px !important;
    gap:24px !important;
    margin:0 auto !important;
    padding:0 !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded .apd5-main-nav {
    height:92px !important;
    min-height:92px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded > .apd5-header-search-row {
    top:103px !important;
    left:50% !important;
    width:936px !important;
    max-width:936px !important;
    height:72px !important;
    min-height:72px !important;
    transform:translateX(-50%) !important;
    align-items:flex-start !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search {
    width:936px !important;
    max-width:936px !important;
    height:72px !important;
    min-height:72px !important;
    grid-template-columns:1.22fr 1px 1.08fr 1px 1.05fr 122px !important;
    border-radius:999px !important;
    background:#ebebeb !important;
    box-shadow:0 4px 15px rgba(0,0,0,.13) !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search[data-context="services"] {
    grid-template-columns:1.18fr 1px 1.05fr 1px 1.16fr 122px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-field > button:first-child {
    height:70px !important;
    min-height:70px !important;
    padding:0 26px !important;
    gap:4px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-field > button:first-child > span:first-child {
    font-size:13px !important;
    line-height:1.12 !important;
    font-weight:700 !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-field > button:first-child > strong[id] {
    font-size:14px !important;
    line-height:1.18 !important;
    font-weight:450 !important;
    overflow:visible !important;
    text-overflow:clip !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-separator {
    height:32px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-submit {
    width:56px !important;
    min-width:56px !important;
    max-width:56px !important;
    height:56px !important;
    min-height:56px !important;
    margin:8px 8px 8px 0 !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search.has-open-panel .apd5-search-submit {
    width:114px !important;
    min-width:114px !important;
    max-width:114px !important;
    padding:0 17px !important;
    gap:7px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-submit .apd5-icon {
    width:18px !important;
    height:18px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search.has-open-panel .apd5-search-submit > span {
    font-size:14px !important;
  }

  /* Panels: dimension and alignment from the supplied Airbnb states. */
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-search-panel {
    top:calc(100% + 10px) !important;
    border-radius:24px !important;
    box-shadow:0 12px 34px rgba(0,0,0,.18) !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-location-panel {
    left:0 !important;
    right:auto !important;
    width:390px !important;
    max-height:430px !important;
    padding:18px 16px !important;
    transform:none !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-date-panel {
    left:50% !important;
    right:auto !important;
    width:770px !important;
    max-width:calc(100vw - 96px) !important;
    transform:translateX(-50%) !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-guests-panel {
    left:auto !important;
    right:0 !important;
    width:400px !important;
    transform:none !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search .apd5-service-panel {
    left:auto !important;
    right:0 !important;
    width:390px !important;
    transform:none !important;
  }

  /* The backdrop starts exactly below the expanded sticky header. */
  html body.apd172-compact-search-parity.apd-marketplace-ui #apd5-search-backdrop:not([hidden]) {
    inset:194px 0 0 0 !important;
  }
}

@media (min-width:1180px) and (max-width:1450px) {
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) > .apd5-header-search-row,
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact:not(.is-search-expanded) #apd5-search {
    width:520px !important;
    max-width:520px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded > .apd5-header-search-row,
  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded #apd5-search {
    width:860px !important;
    max-width:860px !important;
  }

  html body.apd172-compact-search-parity.apd-marketplace-ui
  #apd5-header.is-discovery-context.is-compact.is-search-expanded .apd5-header-row {
    grid-template-columns:180px minmax(660px,1fr) 250px !important;
    gap:16px !important;
  }
}
