/* NiceJerseyShop compact header. Uses the B palette from palette-b.css. */
.njs-header-promo {
  display: flex;
  min-height: 46px;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 6vw, 104px);
  padding: 4px 12px;
  border-bottom: 2px solid var(--njs-primary);
  background: #111;
  color: var(--njs-paper);
}

.njs-header-promo [hidden],
.njs-header-promo[hidden] {
  display: none;
}

.njs-header-offer {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 0 8px;
  align-items: center;
}

.njs-header-offer-label {
  grid-column: 1 / -1;
  color: var(--njs-accent);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.njs-header-offer strong {
  color: inherit;
  font: 800 22px/1 var(--njs-display);
  letter-spacing: .04em;
  text-transform: uppercase;
}

.njs-header-demo-badge {
  padding: 2px 5px;
  color: var(--njs-ink);
  background: var(--njs-accent);
  font: 800 10px/1.1 var(--njs-display);
  letter-spacing: .08em;
}

.njs-header-countdown,
.njs-header-countdown-tiles {
  display: flex;
  align-items: center;
  gap: 6px;
}

.njs-header-countdown-label {
  margin-right: 4px;
  color: #d1d6de;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.njs-header-countdown-tiles > span {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  min-width: 35px;
  padding: 2px 4px;
  background: var(--njs-accent);
  color: var(--njs-ink);
  box-shadow: 2px 2px var(--njs-primary);
  font: 800 18px/1.15 var(--njs-display);
  font-variant-numeric: tabular-nums;
}

.njs-header-countdown-tiles small {
  margin-left: 2px;
  font-size: 9px;
}

#masthead.njs-compact-header {
  border-bottom: 1px solid var(--njs-line);
}

#masthead.njs-compact-header .main-header.col-full {
  display: flex;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  gap: clamp(10px, 1vw, 28px);
  min-height: 54px;
  height: auto;
  margin: 0 auto;
  padding: 0 clamp(14px, 2vw, 48px);
}

#masthead.njs-compact-header .site-branding {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  height: auto;
  width: auto;
  margin: 0;
}

#masthead.njs-compact-header .site-branding .njs-brand-logo {
  max-width: none;
}

#masthead.njs-compact-header .site-branding .njs-brand-logo img {
  width: 147.2px;
}

.njs-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(4px, 1vw, 12px);
}

#masthead.njs-compact-header .shoptimizer-myaccount,
#masthead.njs-compact-header .site-header-cart {
  display: flex;
  position: static;
  align-items: center;
  height: auto;
  margin: 0;
  line-height: 1;
}

#masthead.njs-compact-header :is(.shoptimizer-myaccount a, .site-header-cart a.cart-contents, .njs-header-language summary, .njs-header-search-toggle) {
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  min-height: 38px;
  padding: 0 5px;
  color: var(--njs-ink);
  line-height: 1;
}

#masthead.njs-compact-header :is(.shoptimizer-myaccount a, .site-header-cart a.cart-contents, .njs-header-language summary) {
  display: inline-flex;
}

#masthead.njs-compact-header :is(.shoptimizer-myaccount a, .site-header-cart a.cart-contents, .njs-header-language summary, .njs-header-search-toggle):hover {
  color: var(--njs-primary);
}

#masthead.njs-compact-header .site-header-cart a.cart-contents {
  height: auto;
  margin: 0;
  border: 0 !important;
  border-radius: 0;
  line-height: 1 !important;
}

#masthead.njs-compact-header .site-header-cart .cart-contents .amount {
  display: none;
}

#masthead.njs-compact-header :is(.shoptimizer-myaccount a, .shoptimizer-cart-icon, .njs-header-search-toggle) svg {
  display: block;
  width: 22px;
  height: 22px;
}

#masthead.njs-compact-header .shoptimizer-cart-icon,
#masthead.njs-compact-header .shoptimizer-cart-icon :is(svg, .mini-count) {
  position: static;
}

#masthead.njs-compact-header .shoptimizer-cart-icon {
  display: flex;
  align-items: center;
  margin: 0;
}

#masthead.njs-compact-header .cart-contents .shoptimizer-cart-icon .mini-count {
  margin-right: 0;
  border-color: var(--njs-ink);
  background: var(--njs-ink);
  color: var(--njs-paper);
}

.njs-header-language {
  position: relative;
  font-size: 12px;
}

.njs-header-language summary {
  cursor: pointer;
  list-style: none;
}

.njs-header-language summary::-webkit-details-marker {
  display: none;
}

.njs-header-language summary::after {
  content: '';
  width: 5px;
  height: 5px;
  margin: -3px 2px 0 2px;
  border: solid currentColor;
  border-width: 0 1px 1px 0;
  transform: rotate(45deg);
}

.njs-header-language img {
  display: block;
  flex: none;
  object-fit: contain;
}

.njs-header-language ul {
  position: absolute;
  z-index: 31;
  top: calc(100% + 4px);
  right: 0;
  min-width: 154px;
  max-height: min(70vh, 360px);
  overflow-y: auto;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--njs-line);
  border-radius: 6px;
  background: var(--njs-paper);
  box-shadow: 0 8px 24px rgb(20 33 61 / 14%);
  list-style: none;
}

.njs-header-language li a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  color: var(--njs-ink);
  white-space: nowrap;
}

.njs-header-language li a:is(:hover, :focus-visible, [aria-current="true"]) {
  background: var(--njs-soft);
  color: var(--njs-primary-hover);
}

#masthead.njs-compact-header .njs-header-search-toggle {
  display: none;
  background: none;
  border: 0;
  box-shadow: none;
}

#masthead.njs-compact-header .njs-header-search .site-search {
  position: static;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

#masthead.njs-compact-header .njs-header-search .woocommerce-product-search {
  position: relative;
  margin: 0;
}

#masthead.njs-compact-header .njs-header-search input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 32px 0 10px;
  border: 1px solid var(--njs-line);
  background: var(--njs-neutral);
  box-shadow: none;
  font-size: 12px;
}

#masthead.njs-compact-header .njs-header-search input[type="search"]:focus {
  border-color: #8591a4;
  outline: none;
  box-shadow: none;
}

#masthead.njs-compact-header .njs-header-search .woocommerce-product-search::before {
  content: none;
}

#masthead.njs-compact-header .njs-header-search .woocommerce-product-search button[type="submit"] {
  position: absolute;
  inset: 0 0 0 auto;
  display: block;
  width: 32px;
  height: 100%;
  clip: auto;
  clip-path: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--njs-ink);
  color: transparent;
  box-shadow: none;
  overflow: hidden;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E") center / 20px no-repeat;
}

@media (min-width: 993px) {
  body.sticky-d #masthead.njs-compact-header {
    position: sticky;
    top: 0;
  }

  body.sticky-d.admin-bar #masthead.njs-compact-header {
    top: 32px;
  }

  #masthead.njs-compact-header .main-header.col-full::before,
  #masthead.njs-compact-header .main-header.col-full::after {
    display: none;
  }

  #masthead.njs-compact-header .col-full-nav {
    position: static;
    z-index: auto;
    flex: 1 1 auto;
    width: auto;
    border: 0;
    background: transparent;
  }

  #masthead.njs-compact-header .shoptimizer-primary-navigation.col-full {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  #masthead.njs-compact-header .main-navigation ul.menu {
    display: flex;
    justify-content: center;
    margin: 0;
  }

  #masthead.njs-compact-header .main-navigation ul.menu > li > a.main-menu-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 clamp(6px, .54vw, 12px);
    min-height: 54px;
    line-height: 1;
    font-size: clamp(12px, 1vw, 14px);
    white-space: nowrap;
    transition-property: color, box-shadow;
  }

  #masthead.njs-compact-header .main-navigation ul.menu > li > a > .menu-item-icon {
    margin: 0;
  }

}

@media (min-width: 1320px) {
  #masthead.njs-compact-header .njs-header-search {
    width: clamp(116px, 10vw, 144px);
  }
}

@media (min-width: 1600px) {
  #masthead.njs-compact-header .main-header.col-full {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  #masthead.njs-compact-header .site-branding {
    justify-self: start;
  }

  .njs-header-actions {
    justify-self: end;
  }
}

@media (min-width: 993px) and (max-width: 1319px) {
  #masthead.njs-compact-header .main-header.col-full {
    gap: 10px;
    padding-inline: 14px;
  }

  #masthead.njs-compact-header .site-branding .njs-brand-logo img {
    width: 133.4px;
  }

  #masthead.njs-compact-header .main-navigation ul.menu > li > a.main-menu-link {
    gap: 3px;
    padding-inline: 4px;
    font-size: 11px;
  }

  #masthead.njs-compact-header .main-navigation ul.menu > li.menu-item-has-children > a.main-menu-link::after {
    width: 8px;
    margin-left: 0;
  }
}

@media (max-width: 992px) {
  #masthead.njs-compact-header .main-header.col-full {
    position: relative;
    min-height: 48px;
    gap: 4px;
    padding-inline: 9px;
  }

  body.mobile-toggled #masthead.njs-compact-header {
    z-index: 102;
    pointer-events: none;
  }

  body.mobile-toggled #masthead.njs-compact-header .col-full-nav {
    pointer-events: auto;
  }

  #masthead.njs-compact-header .site-branding {
    position: static;
    flex-direction: row;
  }

  #masthead.njs-compact-header .site-branding .njs-brand-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  #masthead.njs-compact-header .site-branding button.menu-toggle {
    position: static;
    width: 33px;
    height: 42px;
    margin: 0;
  }

  #masthead.njs-compact-header .site-branding .njs-brand-logo img {
    width: clamp(100.8px, 34.2vw, 151.2px);
  }

  .njs-header-actions {
    gap: 2px;
  }

  #masthead.njs-compact-header .njs-header-actions > :is(.njs-header-search, .njs-header-language, .shoptimizer-myaccount) {
    display: none;
  }
}

@media (min-width: 769px) and (max-width: 992px) {
  /* Keep the existing drawer form available through the theme's drawer breakpoint. */
  #masthead.njs-compact-header .favj-drawer-search-box {
    display: block !important;
    padding: 14px 20px 6px;
  }

  #masthead.njs-compact-header .favj-drawer-search-form {
    position: relative;
    margin: 0;
  }

  #masthead.njs-compact-header .favj-drawer-search-form .search-field {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--njs-line);
    border-radius: 10px;
    background: var(--njs-neutral);
    color: var(--njs-ink);
    font-size: 15px;
  }

  #masthead.njs-compact-header .favj-drawer-search-form .search-field:focus {
    border-color: #8591a4;
    outline: none;
    box-shadow: none;
  }

  #masthead.njs-compact-header .favj-drawer-search-form button {
    position: absolute;
    inset: 0 6px 0 auto;
    display: grid;
    place-items: center;
    width: 34px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--njs-muted);
    box-shadow: none;
  }

  #masthead.njs-compact-header .favj-drawer-search-form button svg {
    width: 18px;
    height: 18px;
  }
}

@media (min-width: 993px) and (max-width: 1319px) {
  .njs-header-actions {
    gap: 2px;
  }

  .njs-header-language-label {
    display: none;
  }

  #masthead.njs-compact-header .njs-header-search-toggle {
    display: inline-flex;
  }

  #masthead.njs-compact-header #njs-header-search-panel {
    display: none;
    position: absolute;
    z-index: 31;
    top: 100%;
    inset-inline: 0;
    padding: 8px 12px;
    border-bottom: 1px solid var(--njs-line);
    background: var(--njs-paper);
  }

  #masthead.njs-compact-header .njs-header-search-toggle[aria-expanded="true"] + #njs-header-search-panel {
    display: block;
  }

  #masthead.njs-compact-header .njs-header-search input[type="search"] {
    height: 42px;
    font-size: 16px;
  }
}

@media (max-width: 380px) {
  .njs-header-promo {
    gap: 12px;
  }

  .njs-header-countdown-label {
    margin-right: 0;
    font-size: 9px;
  }

  #masthead.njs-compact-header .main-header.col-full {
    padding-inline: 6px;
  }

  #masthead.njs-compact-header .njs-header-actions .shoptimizer-myaccount a {
    min-width: 29px;
    padding-inline: 3px;
  }
}

@media (max-width: 350px) {
  #masthead.njs-compact-header .site-branding .njs-brand-logo img {
    width: 95.4px;
  }
}
