/*
 * KNICS — desktop header matching the approved 1440 px reference.
 * Mobile markup and styling remain controlled by Warehouse.
 */

@media (min-width: 992px) {
  #header .header-nav {
    display: none !important;
  }

  #header,
  #desktop-header,
  #desktop-header .header-top,
  #desktop-header .knics-desktop-header {
    border-top: 0 !important;
    background: #000 !important;
    box-shadow: none !important;
  }

  #desktop-header .header-top,
  #desktop-header .knics-desktop-header {
    margin: 0 !important;
    padding: 0 !important;
  }

  #desktop-header,
  #desktop-header .header-top,
  #desktop-header-container,
  #desktop-header .knics-header-row {
    height: 76px;
    min-height: 76px;
  }

  #desktop-header-container.container {
    width: 100%;
    max-width: none !important;
    margin: 0;
    padding: 0 26px !important;
  }

  #desktop-header .knics-header-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-width: 0;
  }

  #desktop-header .knics-header-logo,
  #desktop-header .knics-header-navigation,
  #desktop-header .knics-header-search,
  #desktop-header .knics-header-actions,
  #desktop-header .knics-header-actions > *,
  #desktop-header .knics-header-actions .col {
    padding: 0;
  }

  #desktop-header .knics-header-logo {
    display: flex;
    flex: 0 0 138px;
    align-items: center;
  }

  #desktop-header #desktop_logo,
  #desktop-header #desktop_logo > a {
    display: block;
    width: 138px;
    height: auto;
    line-height: 0;
  }

  #desktop-header #desktop_logo .logo,
  #desktop-header #desktop_logo .knics-header-logo-svg {
    display: block;
    width: 138px;
    max-width: none;
    height: auto;
    fill: #04c950;
  }

  #desktop-header .knics-header-navigation {
    display: flex;
    flex: 0 1 auto;
    align-items: center;
    min-width: 0;
    height: 76px;
    margin-left: 64px;
    white-space: nowrap;
  }

  #desktop-header .knics-header-navigation #iqitmegamenu-wrapper,
  #desktop-header .knics-header-navigation .container-iqitmegamenu,
  #desktop-header .knics-header-navigation .iqitmegamenu,
  #desktop-header .knics-header-navigation #cbp-hrmenu,
  #desktop-header .knics-header-navigation #cbp-hrmenu > ul {
    width: auto;
    height: 76px;
    min-height: 76px;
    margin: 0;
    padding: 0;
  }

  #desktop-header .knics-header-navigation .container-iqitmegamenu {
    max-width: none;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul {
    display: flex;
    align-items: center;
    gap: 30px;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li {
    float: none;
    height: 76px;
    margin: 0;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li > a {
    display: inline-flex;
    align-items: center;
    height: 76px;
    padding: 0 !important;
    border: 0 !important;
    color: #f7f7f7 !important;
    background: transparent !important;
    font-family: var(--knics-font-text, "Inter Tight", "Helvetica Neue", Arial, sans-serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none !important;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li > a:hover,
  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li > a:focus-visible {
    color: #04c950 !important;
  }

  /* Current primary page: keep only its navigation label green. */
  body#manufacturer #desktop-header #cbp-hrmenu-tab-4 > a,
  body.page-manufacturer #desktop-header #cbp-hrmenu-tab-4 > a,
  body#cms.cms-id-10 #desktop-header #cbp-hrmenu-tab-5 > a,
  body#cms.cms-id-6 #desktop-header #cbp-hrmenu-tab-9 > a {
    color: #04c950 !important;
  }

  /* Keep the Sneakers panel attached to the viewport, not to the shifted nav. */
  #desktop-header .knics-sneakers-tab > .cbp-hrsub {
    position: fixed !important;
    top: 76px !important;
    right: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    max-height: calc(100vh - 76px);
    margin: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
  }

  #desktop-header .knics-sneakers-tab > .cbp-hrsub > .cbp-hrsub-inner,
  #desktop-header .knics-sneakers-menu-host,
  #desktop-header .knics-sneakers-menu {
    width: 100% !important;
    max-width: none !important;
  }

  #desktop-header .knics-header-search {
    display: flex;
    flex: 0 0 330px;
    align-items: center;
    width: 330px;
    margin: 0 auto;
  }

  #desktop-header .knics-header-search .search-widget,
  #desktop-header .knics-header-search .search-widget form {
    width: 100%;
    margin: 0;
  }

  #desktop-header .knics-header-search .search-widget .input-group {
    position: relative;
    display: block;
    width: 100%;
    height: 42px;
    overflow: hidden;
    border: 0 !important;
    border-radius: 999px;
    background: #f4f4f4 !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  }

  #desktop-header .knics-header-search .search-widget .form-search-control {
    display: block;
    width: 100%;
    height: 42px;
    padding: 0 16px 0 48px;
    border: 0 !important;
    border-radius: 999px;
    outline: 0;
    color: #111 !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 42px;
    box-shadow: none !important;
  }

  #desktop-header .knics-header-search .search-widget .form-search-control::placeholder {
    color: #929292 !important;
    opacity: 1;
  }

  #desktop-header .knics-header-search .search-widget button.search-btn {
    position: absolute;
    top: 0;
    right: auto;
    left: 0;
    z-index: 2;
    display: grid;
    width: 46px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 0;
    color: #8d8d8d !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #desktop-header .knics-header-search .search-widget button.search-btn i {
    font-size: 16px;
  }

  #desktop-header .knics-header-search .search-widget .input-group:focus-within {
    box-shadow: inset 0 0 0 2px #04c950;
  }

  #desktop-header .knics-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 18px;
    width: auto;
    height: 76px;
    margin-left: 0;
  }

  #desktop-header .knics-header-messaging,
  #desktop-header #ps-shoppingcart-wrapper,
  #desktop-header #header-user-btn,
  #desktop-header .knics-header-sell,
  #desktop-header #sell-btn-wrapper {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
  }

  #desktop-header .knics-header-message-link,
  #desktop-header #cart-toogle {
    position: relative;
    display: grid;
    width: 36px;
    height: 42px;
    padding: 0;
    place-items: center;
    color: #fff !important;
    text-decoration: none;
  }

  #desktop-header .knics-header-message-icon,
  #desktop-header .knics-header-cart-icon > svg {
    display: block;
    width: 24px;
    height: 24px;
    overflow: visible;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  #desktop-header .knics-header-notification {
    position: absolute;
    top: 5px;
    right: 1px;
    display: block;
    width: 9px;
    min-width: 9px;
    height: 9px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #000;
    border-radius: 50%;
    color: transparent;
    background: #04c950;
    font-size: 0;
    line-height: 0;
  }

  #desktop-header .knics-header-notification[hidden] {
    display: none !important;
  }

  #desktop-header .knics-header-cart-icon {
    position: relative;
    display: block;
    width: 24px;
    height: 24px;
    color: inherit;
  }

  #desktop-header .cart-products-count-btn {
    position: absolute;
    top: -4px;
    right: -3px;
    display: block;
    width: 10px;
    min-width: 10px;
    height: 10px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #000;
    border-radius: 50%;
    color: transparent;
    background: #04c950;
    font-size: 0;
    line-height: 0;
  }

  #desktop-header #cart-toogle .info-wrapper,
  #desktop-header #cart-toogle > .title,
  #desktop-header #cart-toogle .cart-toggle-details {
    display: none !important;
  }

  #desktop-header .header-user-btn-w,
  #desktop-header .header-user-btn-w .dropdown {
    height: 42px;
  }

  #desktop-header .header-user-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0;
    color: #f7f7f7 !important;
    white-space: nowrap;
    text-decoration: none !important;
  }

  /* Active icon only on the matching page. */
  body#cart #desktop-header #cart-toogle,
  body.page-cart #desktop-header #cart-toogle,
  body[id^="module-origami_inbox-"] #desktop-header .knics-header-message-link,
  body#my-account #desktop-header .header-user-btn,
  body.page-my-account #desktop-header .header-user-btn,
  body#identity #desktop-header .header-user-btn,
  body#addresses #desktop-header .header-user-btn,
  body#address #desktop-header .header-user-btn,
  body#history #desktop-header .header-user-btn,
  body#order-slip #desktop-header .header-user-btn,
  body#order-follow #desktop-header .header-user-btn,
  body#module-origami-seller #desktop-header .header-user-btn,
  body[id^="module-origami_seller_account-"] #desktop-header .header-user-btn {
    color: #04c950 !important;
  }

  body#my-account #desktop-header .knics-header-avatar,
  body.page-my-account #desktop-header .knics-header-avatar,
  body#identity #desktop-header .knics-header-avatar,
  body#addresses #desktop-header .knics-header-avatar,
  body#address #desktop-header .knics-header-avatar,
  body#history #desktop-header .knics-header-avatar,
  body#order-slip #desktop-header .knics-header-avatar,
  body#order-follow #desktop-header .knics-header-avatar,
  body#module-origami-seller #desktop-header .knics-header-avatar,
  body[id^="module-origami_seller_account-"] #desktop-header .knics-header-avatar {
    border-color: #04c950;
  }

  #desktop-header .header-user-btn .title {
    margin: 0 !important;
    color: inherit;
    font-family: var(--knics-font-text, "Inter Tight", "Helvetica Neue", Arial, sans-serif) !important;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
  }

  #desktop-header .knics-header-avatar {
    display: grid;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    overflow: hidden;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    color: #000;
    background: #04c950;
  }

  #desktop-header .knics-header-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  #desktop-header .knics-header-avatar-fallback {
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
  }

  #desktop-header .knics-header-avatar--guest {
    color: #04c950;
    background: transparent;
  }

  #desktop-header .knics-header-avatar--guest svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
  }

  #desktop-header .knics-header-sell,
  #desktop-header .knics-header-sell > div,
  #desktop-header .knics-header-sell #sell-btn-wrapper {
    display: flex;
    align-items: center;
  }

  #desktop-header .header-sell-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 128px;
    min-width: 128px;
    height: 40px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #000 !important;
    background: #04c950 !important;
    font-family: var(--knics-font-text, "Inter Tight", "Helvetica Neue", Arial, sans-serif) !important;
    font-size: 16px;
    font-weight: 500 !important;
    line-height: 1;
    box-shadow: none !important;
  }

  #desktop-header .header-sell-btn:hover,
  #desktop-header .header-sell-btn:focus-visible {
    background: #17dc65 !important;
    transform: translateY(-1px);
  }

  #desktop-header .knics-header-message-link:hover,
  #desktop-header .knics-header-message-link:focus-visible,
  #desktop-header #cart-toogle:hover,
  #desktop-header #cart-toogle:focus-visible,
  #desktop-header .header-user-btn:hover,
  #desktop-header .header-user-btn:focus-visible {
    color: #04c950 !important;
  }

  /* The mini-cart is visually centred under the cart icon on wide desktop. */
  #ps-shoppingcart.knics-shoppingcart #_desktop_blockcart-content.knics-mini-cart-wrap {
    top: calc(100% + 17px) !important;
    right: auto !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  #desktop-header a:focus-visible,
  #desktop-header button:focus-visible,
  #desktop-header input:focus-visible {
    outline: 2px solid #04c950;
    outline-offset: 3px;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  #desktop-header-container.container {
    padding-right: 20px !important;
    padding-left: 20px !important;
  }

  #desktop-header .knics-header-logo,
  #desktop-header #desktop_logo,
  #desktop-header #desktop_logo > a,
  #desktop-header #desktop_logo .logo,
  #desktop-header #desktop_logo .knics-header-logo-svg {
    width: 126px;
    flex-basis: 126px;
  }

  #desktop-header .knics-header-navigation {
    margin-left: 28px;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul {
    gap: 18px;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li > a {
    font-size: 14px;
  }

  #desktop-header .knics-header-search {
    flex-basis: 296px;
    width: 296px;
  }

  #desktop-header .knics-header-actions {
    gap: 10px;
    margin-left: 0;
  }

  #desktop-header .header-user-btn .title,
  #desktop-header .header-sell-btn {
    font-size: 14px;
  }

  #desktop-header .header-sell-btn {
    width: 116px;
    min-width: 116px;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  #desktop-header-container.container {
    padding-right: 16px !important;
    padding-left: 16px !important;
  }

  #desktop-header .knics-header-logo,
  #desktop-header #desktop_logo,
  #desktop-header #desktop_logo > a,
  #desktop-header #desktop_logo .logo,
  #desktop-header #desktop_logo .knics-header-logo-svg {
    width: 114px;
    flex-basis: 114px;
  }

  #desktop-header .knics-header-navigation {
    margin-left: 16px;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul {
    gap: 14px;
  }

  #desktop-header .knics-header-navigation #cbp-hrmenu > ul > li > a {
    font-size: 13px;
  }

  #desktop-header .knics-header-search {
    flex-basis: 230px;
    width: 230px;
  }

  #desktop-header .knics-header-search .search-widget .form-search-control {
    font-size: 13px;
  }

  #desktop-header .knics-header-actions {
    gap: 8px;
    margin-left: 0;
  }

  #desktop-header .header-user-btn .title {
    display: none;
  }

  #desktop-header .header-sell-btn {
    width: 92px;
    min-width: 92px;
    height: 38px;
    padding: 0 12px !important;
    font-size: 13px;
  }

  #ps-shoppingcart.knics-shoppingcart #_desktop_blockcart-content.knics-mini-cart-wrap {
    right: 0 !important;
    left: auto !important;
    transform: none !important;
  }
}
