.qrss__tabs__item {
  margin-bottom: 0;
  width: 100%;
}

.qrss__tabs__list {
  flex-direction: column;
  gap: 2px;
  list-style: none;
  overflow: hidden;
}

.qrss__tabs__tab {
  background-color: var(--QLD-Govt-Tints-TI-01);
  border: 1px solid var(--qrss-grey-border);
  border-bottom-color: transparent;
  color: var(--qrss-dark-blue) !important;
  font-size: 16px;
  height: 50px;
  justify-content: center;
  line-height: 24px;
  padding: 0 24px;
  width: 100%;
}

.qrss__tabs__tab.active,
.qrss__tabs__tab.active:hover,
.qrss__tabs__tab--current,
.qrss__tabs__tab--current:hover {
  background-color: white;
  border-bottom-color: var(--qrss-light-grey);
}

.qrss__tabs__tab--disabled {
  background-color: var(--qrss-accordion-border);
  border-color: transparent;
  color: var(--qrss-grey-pending) !important;
  cursor: default;
  pointer-events: none;
}

.qrss__tabs__tab:hover {
  background-color: white;
  border-bottom-color: var(--qrss-light-grey);
  color: var(--qrss-dark-blue);
  text-decoration: underline !important;
}

@media (min-width: 768px) {
  .qrss__tabs__item {
    margin-bottom: -1px;
    width: auto;
  }

  .qrss__tabs__list {
    flex-direction: row;
    grid-auto-flow: column;
    flex: 1 1 0%;
    align-items: stretch;
  }

  .qrss__tabs__list::after {
    background-color: var(--qrss-light-grey);
    bottom: -1px;
    content: '';
    height: 1px;
    left: 0;
    position: absolute;
    transform: translateX(-50%);
    width: 300vw;
    z-index: 0;
  }

  .qrss__tabs__tab {
    border: 1px solid transparent;
    border-bottom-color: var(--qrss-light-grey);
    border-radius: 2px 2px 0 0;
    justify-content: flex-start;
    width: auto;
    padding-bottom: 13px;
    padding-top: 13px;
    text-align: center;
    height: 100%;
  }

  .qrss__tabs__tab--disabled {
    border-bottom-color: var(--qrss-light-grey);
    border-color: var(--qrss-light-grey);
  }

  .qrss__tabs__tab.active,
  .qrss__tabs__tab--current {
    border: 1px solid var(--qrss-grey-border);
    border-bottom-color: white;
    position: relative;
    z-index: 1;
  }

  /*
   * Optional tablet+ underline mode:
   * draw the bottom rule from the active tab out to viewport edges, leaving
   * no rule under the active tab itself.
   */
  .qrss__tabs--global-underline .qrss__tabs__list::after {
    content: none;
  }

  .qrss__tabs--global-underline .qrss__tabs__list {
    overflow: visible;
  }

  .qrss__tabs--global-underline .qrss__tabs__tab.active::before,
  .qrss__tabs--global-underline .qrss__tabs__tab.active::after,
  .qrss__tabs--global-underline .qrss__tabs__tab--current::before,
  .qrss__tabs--global-underline .qrss__tabs__tab--current::after {
    background-color: var(--qrss-light-grey);
    bottom: -1px;
    content: '';
    height: 1px;
    pointer-events: none;
    position: absolute;
    width: 100vw;
  }

  .qrss__tabs--global-underline .qrss__tabs__tab.active::before,
  .qrss__tabs--global-underline .qrss__tabs__tab--current::before {
    right: 100%;
  }

  .qrss__tabs--global-underline .qrss__tabs__tab.active::after,
  .qrss__tabs--global-underline .qrss__tabs__tab--current::after {
    left: 100%;
  }
}

@media (min-width: 992px) {
  .qrss__tabs__list {
    align-items: flex-end;
  }

  .qrss__tabs__tab {
    height: 60px;
  }

  .qrss__tabs__tab.active,
  .qrss__tabs__tab.active:hover,
  .qrss__tabs__tab--current,
  .qrss__tabs__tab--current:hover {
    height: 64px;
  }
}

@media (min-width: 1200px) {
  .qrss__tabs__tab {
    height: 50px;
  }

  .qrss__tabs__tab.active,
  .qrss__tabs__tab.active:hover,
  .qrss__tabs__tab--current,
  .qrss__tabs__tab--current:hover {
    height: 54px;
  }
}

/*
 * Opt-in modifier: use the horizontal “desktop” tab chrome at every breakpoint.
 * Default tabs stack as full-width buttons below 768px; add this class on the same
 * element as .qrss__tabs (e.g. Mark attendance day tabs) to keep real tabs on narrow viewports.
 */
.qrss__tabs--always-desktop .qrss__tabs__item {
  margin-bottom: -1px;
  width: auto;
}

.qrss__tabs--always-desktop .qrss__tabs__list {
  align-items: flex-end;
  flex: 1 1 0%;
  flex-direction: row;
  grid-auto-flow: column;
  position: relative;
}

.qrss__tabs--always-desktop .qrss__tabs__list::after {
  background-color: var(--qrss-light-grey);
  bottom: -1px;
  content: '';
  height: 1px;
  left: 0;
  position: absolute;
  transform: translateX(-50%);
  width: 300vw;
  z-index: 0;
}

.qrss__tabs--always-desktop .qrss__tabs__tab {
  border: 1px solid transparent;
  border-bottom-color: var(--qrss-light-grey);
  border-radius: 2px 2px 0 0;
  height: 50px;
  justify-content: flex-start;
  padding-bottom: 13px;
  padding-top: 13px;
  text-align: center;
  width: auto;
}

.qrss__tabs--always-desktop .qrss__tabs__tab--disabled {
  border-bottom-color: var(--qrss-light-grey);
  border-color: var(--qrss-light-grey);
}

.qrss__tabs--always-desktop .qrss__tabs__tab.active,
.qrss__tabs--always-desktop .qrss__tabs__tab--current {
  border: 1px solid var(--qrss-grey-border);
  border-bottom-color: white;
  height: 54px;
  position: relative;
  z-index: 1;
}

.qrss__tabs--always-desktop .qrss__tabs__tab.active:hover,
.qrss__tabs--always-desktop .qrss__tabs__tab--current:hover {
  height: 54px;
}