/* header and nav layout */
header .nav-wrapper {
  background-color: var(--background-color);
  width: 100%;
  z-index: 2;
  position: fixed;
  box-shadow: 0 0 2rem 0 rgb(27 28 29 / 15%);
  top: 0;
}

body.americasbest.home-page-bgcolor {
  background-color: var(--background-lighter);
}

.nav-brand .default-content-wrapper img:focus-visible {
  outline: var(--primary-color1) solid 2px;
}
.header-container-wrapper .nav-book-exam-button .button-container a {
  text-decoration: none;
}
nav .text-wrapper {
  display: none;
}

header.header-wrapper {
  min-height: 10.125rem;
}

header nav {
  box-sizing: border-box;
  grid-template: 'hamburger brand tools' var(
      --nav-height
    ) 'sections sections sections' 1fr / auto 1fr auto;
  align-items: center;
  gap: 0 1.5rem;
  margin: auto;
  font-family: var(--body-font-family);
}

header nav[aria-expanded='true'] {
  grid-template:
    'hamburger brand' var(--nav-height) 'sections sections' 1fr
    'tools tools' var(--nav-height) / auto 1fr;
  overflow-y: auto;
  min-height: 100dvh;
}

.header-container-wrapper .default-content-wrapper p .icon-left-icon,
.header-container-wrapper .default-content-wrapper p .icon-right-icon,
.header-container-wrapper .default-content-wrapper p .icon-down-icon,
.header-container-wrapper .default-content-wrapper p .icon-left-mobile-icon,
.header-container-wrapper .default-content-wrapper p .icon-right-mobile-icon,
.header-container-wrapper .default-content-wrapper p .icon-down-mobile-icon {
  width: 0.75rem;
  height: 0.76rem;
}

/* tools */
header nav .nav-tools .default-content-wrapper {
  display: flex;
}

header nav .nav-tools .default-content-wrapper p {
  margin: 0;
}

.header-container-wrapper .nav-find-store {
  position: relative;
}

.header-container-wrapper .nav-find-store {
  position: relative;
}

.header-container-wrapper .nav-find-store:focus-visible {
  outline-offset: 0.125rem;
  outline: 0.125rem solid var(--text-white) !important;
  border-radius: 0.063rem;
}

.header-container-wrapper .nav-find-store .default-content-wrapper {
  display: flex;
  gap: 0.5rem;
  float: right;
}

header .header p {
  margin: 0;
}

.text-wrapper .block a:any-link {
  text-decoration: underline;
}

.text-wrapper .block a:any-link:hover {
  text-decoration: none;
}

.text-wrapper .block a:any-link:focus {
  outline: 2px solid var(--link-color);
  border-radius: 4px;
  text-decoration: none;
}

@media (min-width: 992px) {
  .search-input:focus {
    border: 1px solid var(--text-white);
    outline: 1px solid var(--text-white);
    outline-offset: 4px;
  }

  header.header-wrapper {
    min-height: 8.875rem;
  }

  header nav[aria-expanded='true'] {
    min-height: 0;
    overflow: visible;
  }

  header .nav-wrapper {
    position: static;
  }

  header nav .header-main-container {
    background-color: var(--background-dark);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 9;
    padding: 0 4rem;
  }

  header nav .header-container-wrapper {
    display: grid;
    max-width: 90rem;
    margin: 0 auto;
    grid-template-columns: 7fr 1fr 1fr;
    align-items: center;
  }

  header nav .navigation-wrapper {
    display: flex;
    justify-content: space-between;

    gap: 3rem;
    align-items: center;
    max-width: 90rem;
    margin: 0 auto;
    width: 91%;
  }

  header nav > .navigation-main-container {
    position: relative;
    top: 5.25rem;
    box-shadow: 0 0 2rem 0 rgba(27 28 29 / 15%);
    z-index: 8;
    background: var(--text-white);
    padding: 0;
  }

  header nav .navigation-wrapper .navigation-wrapper {
    padding: 0;
  }

  .navigation .navigation-column-card .text-btn p a {
    margin: 0;
    padding: 0;
  }
  header nav .navigation-wrapper .navigation-wrapper:focus-visible {
    outline: var(--primary-color1) solid 2px;
  }

  .header-container-wrapper .nav-find-store .default-content-wrapper p {
    color: var(--text-white);
    font-family: var(--body-font-family);
    font-size: var(--body-font-size-xs);
    font-style: normal;
    font-weight: var(--font-weight-light-bold);
    line-height: normal;
    cursor: pointer;
    min-width: 104%;
  }

  .header-container-wrapper .nav-find-store .default-content-wrapper p:hover {
    text-decoration: underline;
  }

  .header-container-wrapper .nav-book-exam-button .button-container a {
    background-color: var(--text-white);
    border: unset;
    margin-left: 24px;
    color: var(--text-medium);
  }

  .eyeglassworld .header-container-wrapper .nav-book-exam-button .button-container a {
    color: var(--link-color);
  }

  .header-container-wrapper .nav-book-exam-button .button-container a:focus {
    outline: 0.125rem solid var(--text-white);
  }

  header nav .navigation-wrapper .navigation .navigation-title p {
    color: var(--link-color);
    text-align: center;
    font-family: var(--body-font-family);
    font-size: var(--body-font-size-xs);
    font-style: normal;
    font-weight: var(--font-weight-light-bold);
    line-height: normal;
    width: max-content;
  }

  header nav .navigation-wrapper .navigation .navigation-title p:hover {
    text-decoration: underline;
  }

  .navigation-column .navigation-column-child > ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding-top: 1rem;
  }

  .navigation-columns-wrapper .navigation-column .navigation-column-title,
  .navigation-columns-wrapper .navigation-column .navigation-column-title h5 {
    color: var(--text-darkest);
    font-family: var(--body-font-family);
    font-size: var(--body-font-size-xl);
    font-style: normal;
    font-weight: var(--font-weight-regular);
    line-height: normal;
  }

  .navigation .card-wrapper img {
    max-height: 14.8125rem;
  }

  header nav[aria-expanded='true'] .nav-sections {
    align-self: unset;
  }

  header nav .nav-sections .default-content-wrapper > ul > li {
    flex: 0 1 auto;
    position: relative;
  }

  header nav .nav-sections .default-content-wrapper > ul > li > ul {
    display: none;
    position: relative;
  }

  header nav .nav-sections .default-content-wrapper > ul > li[aria-expanded='true'] > ul {
    display: block;
    position: absolute;
    left: -1.5rem;
    width: 12rem;
    top: 150%;
    padding: 1rem;
    background-color: var(--light-color);
    white-space: initial;
  }

  header nav .nav-sections .default-content-wrapper > ul > li > ul::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    width: 0;
    height: 0;
    border-left: 0.5rem solid transparent;
    border-right: 0.5rem solid transparent;
    border-bottom: 0.5rem solid var(--light-color);
  }

  header nav .nav-sections .default-content-wrapper > ul > li > ul > li {
    padding: 0.5rem 0;
  }

  .navigation-wrapper {
    background-color: var(--text-white);
  }

  .header-container-wrapper .nav-book-exam-button p.button-container {
    margin: 0;
    padding: 1rem 0;
  }

  .navigation-wrapper.input-opened {
    padding: 1rem 0 1rem 0;
  }

  .header-favorite-icon-container .default-content-wrapper .fav-mobile-icon {
    display: none;
  }
}

header nav .navigation-wrapper .navigation-column {
  border-right: 1px solid var(--border-color);
  flex: 1 1 0;
  padding-right: 1.5rem;
}

header nav .navigation-wrapper .navigation-column:last-of-type {
  border-right: none;
}

header nav body:not(.no-eds) a:any-link {
  color: var(--text-white);
}

/* brand */
header .nav-brand {
  grid-area: brand;
  flex-basis: 8rem;
  font-size: var(--body-font-size-xl-2);
  font-weight: 700;
  line-height: 1;
}

header nav .nav-brand .logo img {
  width: 8rem;
  height: auto;
}

/* sections */
header nav .nav-sections {
  grid-area: sections;
  flex: 1 1 auto;
}

header nav .nav-sections ul {
  list-style: none;
  padding-left: 0;
  font-size: var(--body-font-size-s);
}

header nav .nav-sections ul > li {
  font-weight: 500;
}

header nav .nav-sections ul > li > ul {
  margin-top: 0;
}

header nav .nav-sections ul > li > ul > li {
  font-weight: 400;
}

.header-container-wrapper .popover {
  display: none;
  position: absolute;
  top: 52px;
  right: -24px;
  width: 297px;
  padding: 0 24px 12px;
  background-color: var(--background-dark);
  border-radius: 0 0 4px 4px;
}

.popover-content {
  padding: 0;
}

.search-input-container {
  position: relative;
  margin-bottom: 12px;
}

.search-button {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--link-color);
  cursor: pointer;
  z-index: 1;
  outline: none;
}

.search-button:hover {
  color: #374151;
}

.search-button:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.search-button:focus:not(:focus-visible) {
  outline: none;
  background-color: transparent;
}

.search-button:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.close-button {
  position: absolute;
  top: 15px;
  right: 12px;
  display: flex;
  color: var(--text-warm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  outline: none;
  padding: 2px;
}

.close-button:focus {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.close-button:focus:not(:focus-visible) {
  outline: none;
  background-color: transparent;
}

.close-button:focus-visible {
  outline: 2px solid var(--link-color);
  outline-offset: 2px;
}

.search-input {
  width: 100%;
  height: 3rem;
  padding: 0.75rem 2rem 12px 2.5rem;
  border-radius: 3rem;
  border: 1px solid var(--background-dark);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-xs);
  line-height: normal;
  font-weight: var(--font-weight-regular);
  transition: all 0.2s ease;
  box-sizing: border-box;
  color: var(--text-dark);
}

.search-input::placeholder {
  color: var(--text-warm);
}

/* .search-input:hover {
  border: 1px solid #1e4b8f;
} */

.search-input::placeholder {
  color: var(--text-warm);
}

.currentLocationButton.location-button {
  width: 100%;
  padding: 0;
  height: unset;
  border: none;
  background-color: transparent;
  color: var(--text-white);
  font-size: var(--body-font-size-xs);
  font-weight: var(--font-weight-light-bold);
  line-height: normal;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--body-font-family);
  text-align: center;
}

.currentLocationButton.location-button:hover {
  background-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.currentLocationButton.location-button:active {
  border: none;
}

.currentLocationButton.location-button:active:hover {
  text-decoration: none;
}

.currentLocationButton.location-button:focus,
.currentLocationButton.location-button:focus-visible,
.currentLocationButton.location-button:active:focus {
  outline: none;
  border: 1px solid var(--text-white);
  background-color: transparent;
  /* color: inherit; */
}

/* header for mobile for temporary */

@media (max-width: 991px) {
  nav .logo-wrapper {
    margin-left: 1rem;
  }
  .fav-mobile-icon.hide-on-scroll {
    display: none !important;
  }
  .icon-close-icon.hide-on-scroll {
    display: none !important;
  }
  .navigation-wrapper .text-wrapper .icon:nth-child(2) {
    display: block;
  }
  .navigation-wrapper .text-wrapper .icon img {
    filter: var(--filter-quicklinks);
  }

  body .navigation-wrapper .text-wrapper a {
    text-decoration: underline;
    font-weight: var(--font-weight-light-bold);
    color: var(--link-color);
  }

  body .navigation-wrapper .text-wrapper .icon {
    width: 1rem;
    height: 1rem;
  }

  body .navigation-wrapper .text-wrapper a:hover {
    text-decoration: none;
  }

  nav .text-wrapper {
    display: block;
  }

  nav .navigation-wrapper-box {
    order: 0;
  }

  header nav .nav-sections .text-wrapper ul {
    gap: 1rem;
  }

  header nav .nav-sections .text-wrapper ul li {
    padding-bottom: 0;
    display: flex;
    gap: 0.5rem;
    align-items: center;
  }

  nav .text-wrapper {
    order: 1;
  }

  header nav .nav-tools .default-content-wrapper {
    justify-content: flex-end;
    display: flex !important;
  }

  .nav-tools .default-content-wrapper .fav-mobile-icon {
    display: none;
  }

  nav[aria-expanded='true'] .nav-tools .default-content-wrapper .fav-mobile-icon {
    display: block;
    position: fixed;
    z-index: 10000;
    padding: 0.75rem 1.5rem;
    border-radius: 3rem;
    background: var(--primary-cta);
    font-family: var(--body-font-family);
    font-size: var(--body-font-size-xxs);
    font-style: normal;
    font-weight: var(--font-weight-light-bold);
    line-height: normal;
    top: 1.5rem;
    left: 1rem;
  }

  .nav-tools .default-content-wrapper .fav-mobile-icon a {
    color: var(--text-white);
  }

  .header-container-wrapper .nav-find-store .default-content-wrapper p {
    color: var(--link-color);
    text-align: center;
    font-size: var(--body-font-size-xxs);
    font-style: normal;
    font-weight: var(--font-weight-regular);
    line-height: normal;
    text-decoration-line: underline;
    text-decoration-style: solid;
    text-decoration-skip-ink: auto;
    text-decoration-thickness: auto;
    text-underline-offset: auto;
  }

  .militaryoptical .header-container-wrapper .nav-find-store .default-content-wrapper p {
    text-decoration-line: none;
  }

  .header-container-wrapper .nav-carusal-button .default-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
    top: -1.875rem;
    padding-bottom: 0.75rem;
    padding-top: 1rem;
  }

  .header-container-wrapper .nav-book-exam-button .button-container a {
    background-color: var(--primary-cta);
    color: var(--text-white);
  }

  .header-container-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
  }

  .header-container-wrapper > .nav-carusal-button {
    width: 100%;
    margin-bottom: 3.5625rem;
  }

  .header-container-wrapper .popover {
    position: static;
    display: none;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin-top: 12px;
    background-color: var(--text-white);
  }

  .search-input-container {
    margin-bottom: 9px;
  }

  .search-input:focus:hover {
    border: 1px solid var(--primary-border);
  }

  .search-input:focus {
    outline: 2px solid var(--primary-border);
    outline-offset: 4px;
  }

  .currentLocationButton.location-button {
    font-size: var(--body-font-size-xxs);
    line-height: normal;
    color: var(--link-color);
  }

  .currentLocationButton.location-button:focus {
    outline: 1px;
    border: 1px solid var(--link-color);
    color: var(--link-color);
  }

  .currentLocationButton.location-button:focus:hover {
    text-decoration: none;
    color: var(--link-color);
  }

  .currentLocationButton.location-button:active:hover {
    text-decoration: none;
  }

  .currentLocationButton.location-button:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
  }

  .account-modal {
    width: 17.5rem;
    top: 4.5rem;
    margin-top: 0.125rem;
    right: 0;
  }

  header p:has(.icon.icon-favourite-icon) {
    display: none !important;
  }

  .account-modal svg {
    left: 12rem;
  }

  .icon-account-icon.active {
    filter: invert(27%) sepia(83%) saturate(655%) hue-rotate(203deg) brightness(94%) contrast(92%);
  }

  .cart-modal {
    width: 17.5rem;
    top: 4.5rem;
    margin-top: 0.125rem;
    right: 0;
  }

  .cart-modal svg {
    left: 15.063rem;
  }

  .navigation-wrapper.input-opened {
    align-items: center;
    bottom: auto;
    padding: 0.75rem 1rem;
  }

  header nav:has(.navigation-wrapper.input-opened:not(.fixed)) {
    height: 10rem;
  }

  .icon.icon-hamburger-menu {
    width: 1.5rem;
    height: 1.5rem;
  }

  .icon.icon-hamburger-menu img {
    height: 100%;
    width: 100%;
  }

  .icon.icon-hamburger-menu img {
    height: 100%;
    width: 100%;
  }

  .suggestion-list-wrapper a:any-link {
    font-size: var(--body-font-size-xxs);
    font-weight: 800;
    line-height: normal;
    letter-spacing: 0.28px;
  }
}

/* Backdrop for Find a Store popover */
.store-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0 0 0 / 50%);
  z-index: 5;
  transition: opacity 0.2s ease;
  opacity: 1;
}

.store-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Favorite icon Modal */

.modal-overlay.fav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgb(0 0 0 / 50%);
  z-index: 7;
}

.icon-favourite-icon::before {
  border-left: 0.75rem solid transparent;
  border-right: 0.75rem solid transparent;
  border-bottom: 0.75rem solid #f3f2ef;
  right: 0.563rem;
  z-index: 1;
}

/* My Account modal */
.modal-overlay.account-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0 0 0 / 50%);
  z-index: 1000;
}

.account-modal {
  position: fixed;
  top: 9rem;
  background: var(--color-white);
  padding: 1rem;
  z-index: 1000;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.625rem rgba(0 0 0 / 30%);
  width: 17.5rem;
}

.account-modal .modal-content {
  max-width: 25rem;
}

.account-modal .modal-content .account-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-black);
}

.account-modal .icon-account-icon::before {
  border-left: 0.75rem solid transparent;
  border-right: 0.75rem solid transparent;
  border-bottom: 0.75rem solid #f3f2ef;
  right: 0.563rem;
  z-index: 1;
}

.account-modal svg {
  position: absolute;
  top: -0.4375rem;
  right: 1rem;
  width: 1rem;
  height: 0.5rem;
}

/* Cart modal */
.modal-overlay.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0 0 0 / 50%);
  z-index: 1000;
}

.cart-modal {
  position: fixed;
  top: 9rem;
  background: var(--color-white);
  padding: 1rem;
  z-index: 1000;
  border-radius: 0.5rem;
  box-shadow: 0 0.125rem 0.625rem rgba(0 0 0 / 30%);
  width: 17.5rem;
}

.cart-modal .modal-content {
  max-width: 25rem;
}

.cart-modal .modal-content .cart-title {
  margin-top: 0;
  margin-bottom: 0.75rem;
  color: var(--color-black);
}

.cart-modal .icon-cart-icon::before {
  border-left: 0.75rem solid transparent;
  border-right: 0.75rem solid transparent;
  border-bottom: 0.75rem solid #f3f2ef;
  right: 0.563rem;
  z-index: 1;
}

.cart-modal svg {
  position: absolute;
  top: -0.4375rem;
  right: 1rem;
  width: 1rem;
  height: 0.5rem;
}

/* Search icon */

.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0 0 0 / 50%);
  z-index: 1;
}

.default-content-wrapper .icon {
  display: flex;
}

.default-content-wrapper .icon:focus {
  outline: 2px solid var(--primary-cta);
  border-radius: 2px;
}

header .navigation-wrapper .header-search-container .default-content-wrapper .icon {
  align-items: center;
  justify-content: center;
  padding: 0.875rem;
}

.section .default-content-wrapper .icon img {
  width: 1rem;
  height: 1rem;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  display: block;
}

p:has(.icon-favourite-icon-active),
p:has(.icon-account-icon-active) {
  display: none;
}

p:has(.icon-account-icon.hide-account_icon) {
  display: none;
}

header p:has(.icon.icon-favourite-icon.active) {
  display: none;
}

.icon-favourite-icon.active svg,
.icon-account-icon.active svg {
  height: 100%;
  width: 100%;
}

.militaryoptical .icon-cart-icon.active img {
  filter: none;
}

.suggestion-container {
  max-width: 199px;
  width: 100%;
  display: flex;
  gap: 17px;
  flex-direction: column;
}

.search-result-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.search-title-row {
  display: flex;
  justify-content: space-between;
}

.search-title-row .button-container a.button {
  padding: 0;
}

.suggestion-list-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

body header nav .suggestion-list-wrapper a:any-link {
  color: var(--link-color);
  font-family: var(--body-font-family);
  font-size: var(--body-font-size-xs);
  font-weight: var(--font-weight-regular);
  line-height: normal;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: auto;
}

.navigation-wrapper.input-opened .section.header-search-container {
  position: static;
  flex: 1 1 100%;
}

.search-input-wrapper .link-btn .button-container a.button {
  padding: 4px;
  color: var(--link-color);
}

.out-stock-container {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  left: -4px;
  top: 8px;
}

.out-stock-container img {
  width: 16px;
  position: relative;
  left: -1px;
}

.out-stock-content {
  color: var(--color-red);
  font-family: var(--heading-font-family);
  font-size: var(--body-font-size-xxs);
  font-weight: 900;
  line-height: 140%;
  /* 19.6px */
  border-radius: 2px 0 0 2px;
  border-top: 1px solid var(--color-red);
  border-bottom: 1px solid var(--color-red);
  border-left: 1px solid var(--color-red);
  display: flex;
  padding-left: 8px;
  align-items: center;
  align-self: stretch;
}

@media (width=900px) {
  .search-overlay {
    top: 10.625rem !important;
  }

  .navigation-wrapper {
    bottom: 0;
    margin-left: 0;
  }
}

.profile-menu-wrapper,
.favorite-icon-wrapper {
  display: none;
}

@media (min-width: 992px) and (max-width: 1440px) {
  .account-modal {
    right: 4.5rem;
    left: unset;
  }

  .cart-modal {
    right: 1.125rem;
    left: unset;
  }
}

@media (min-width: 1441px) {
  .account-modal {
    right: 0;
    left: 70.1875rem;
    max-width: 90rem;
    margin: 0 auto;
  }

  .cart-modal {
    right: 0;
    left: 69.6rem;
    max-width: 90rem;
    margin: 0 auto;
  }

  .navigation-wrapper.input-opened .nav-brand {
    left: unset;
  }
}

#header-search_btn-icon {
  cursor: pointer;
}

#header-search_btn-icon > div {
  width: 16px;
  height: 16px;
}

.favorite-icon-container p:has(.active) {
  display: none;
}

.text-btn .button-container a.button:hover {
  background-color: transparent;
}

header .dropin-card__content .signin-link:hover {
  text-decoration: underline;
}

a.skip-to-content:focus {
  top: unset;
  left: unset;
  background-color: var(--color-white);
  color: var(--link-color);
  border-width: 0;
  text-decoration: none;
  opacity: 1;
}

a.skip-to-content {
  position: absolute;
  width: auto;
  height: auto;
  padding: 0;
  z-index: 10;
  white-space: nowrap;
  opacity: 1;
  cursor: default;
  top: -3rem;
  left: -8rem;
}
