@import "~@department-of-veterans-affairs/css-library/dist/tokens/scss/variables";
@import "./prescription-details";
@import "./print-download";

.link-button,
.link-button:hover,
.link-button:active {
  background-color: transparent;
  color: var(--vads-color-link);
  font-weight: normal;
  text-decoration: underline;
  border: none;
  border-radius: 0px;
  transition-duration: 0.3s;
  padding: 0px;
  width: fit-content;
}
.link-button:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
.refill-back-link {
  margin-top: 50px;
  display: block;
  margin-bottom: 16px;
  margin-left: 13px;
  width: fit-content;
}
.refill-loading-indicator {
  margin-top: 70px;
}

.print-download-btn-min-height {
  min-height: 44px;
}

.renew-pagination-container {
  width: 100%;
  display: flex;
  justify-content: center;
}
.routes-container {
  @media (max-width: $small-screen) {
    // .vads-l-grid-container adds 15px on left and right, this overwrites that
    padding-left: 12px;
    padding-right: 12px;
  }
}
.main-content {
  padding: 0;
  margin-bottom: 2rem !important;

  @media (max-width: $small-screen) {
    max-width: 480px;
  }
}
.link-to-details {
  i {
    font-size: 16px;
    margin-left: 6px;
  }
  .right-angle {
    text-decoration: none;
  }
}
.va-button {
  margin: 4px 0;
}
.landing-page {
  h1 {
    color: var(--vads-color-black);
  }
  .medications-list-sort {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    .va-button {
      padding: 2px 0;
      margin: 0 0 2.5px 0;
    }
    .sort-button {
      margin-left: 8px;
      margin-top: 57px;
    }
  }
  .rx-page-total-info {
    margin-top: 15px;
    margin-bottom: 15px;
    max-width: 500px;
    font-size: 1rem;
    font-weight: normal;
  }
  section {
    .feedback {
      float: right;
      width: 130px;
    }
  }
  .rx-card-container{
    max-width: 500px;
    padding-bottom: 5px;
    color: var(--vads-color-base-darker);
    .rx-card-details{
      margin-left: 5px;
      h3 {
        margin: 8px 0;
      }
      p {
        margin: 0;
      }
      .shipping-info {
        margin-top: 5px;
        margin-bottom: 5px;
        display: flex;
        flex-direction: row;
        align-items: center;
        .shipping-icon {
          margin: 10px;
          width: 20px;
          height: 20px;
          border: 1px solid var(--vads-color-base);
        }
      }
      .statusIcon {
        display: flex;
      }
    }
  }
  .rx-landing-page-footer {
    max-width: 500px;
    .footer-header {
      color: var(--vads-color-base-darker);
    }
    .footer-links {
      margin: 10px 0;
      a {
        font-weight: bold;
      }
      p {
        margin-top: 5px;
        margin-bottom: 15px;
      }
    }
  }
  @media (max-width: $small-screen) {
    padding-left: 0px;
    padding-right: 0px;
  }
}

.renew-card-details > p {
  margin: 0px;
}
//fixed misaligned icon for filter component
#filter > span {
  vertical-align: top;
}

.pagination {
  max-width: 500px;
  border-top: 0px;
}

@media print {
  .main-content {
    width: 100%;
  }
  .landing-page {
    margin-top: 10px;
  }
  h1 {
    font-size: 40px;
  }
  h2 {
    font-size: 32px;
    margin: 0.625rem 0 !important;
    padding: 0;
  }
  .rx-page-total-info {
    margin: 0.9375rem 0 !important;
    padding: 0;
  }
  .no-print,
  .no-print * {
    visibility: hidden;
    display: none;
    margin: 0px !important;
    padding: 0px !important;
  }
  .no-break {
    break-inside: avoid;
  }
  .print-only-refill-container {
    margin-top: 0.9375rem;
  }
  .print-only-crisis-line-header {
    font-size: 0.9125rem;
    margin-bottom: 3.125rem;
    width: 100%;
  }
  .print-only-rx-image-container {
    img {
      display: block;
      width: 259px;
      height: 195.85px;
      margin: 0.3125rem 0;
    }
  }
  .print-only-rx-container {
    margin-bottom: 0.84375rem;
    p {
      padding: 0;
      margin: 0;
      word-wrap: break-word;
    }
    .print-only-rx-details-container {
      margin-bottom: 0.625rem;
    }
    h4 {
      margin: 0.625rem 0 0.3125rem 0;
      padding: 0;
      font-size: 18px;
    }
    h3 {
      margin: 0.625rem 0;
      padding: 0;
      font-size: 22px;
    }
    h2 {
      font-size: 30px;
    }
  }
  a, a:visited, a:active {
    color: inherit !important;
  }
  va-checkbox {
    &.select-1-checkbox {
      &::part(label) {
        padding-left: 0;

        &::before {
          display: none;
        }
      }
    }
  }
}

@media screen {
  .print-only,
  .print-only * {
    visibility: hidden;
    display: none;
    margin: 0px !important;
    padding: 0px !important;
  }
}

.rx-fill-refill-button {
  va-loading-indicator {
    display: flex;
    justify-content: left;
    align-items: center;
    gap: 0.9375rem;
  }
}

.rx-refill-submit-error-hidden {
  visibility: hidden;
  margin: 0;
  padding: 0rem;
  height: 0;
}

.rx-refill-submit-error-visible {
  visibility: visible;
  margin: 0 0 20px 0;
  padding: unset;
  height: unset;
}

.refillable-prescription-item {
  display: flex !important;
  align-items: baseline;

  &::before {
    min-width: 1.25rem !important;
  }
}

va-checkbox {
  &.select-all-checkbox,
  &.select-1-checkbox {
    &::part(checkbox) {
      max-width: 100%;
    }

    &::part(label) {
      font-weight: bold;

      &::before {
        box-shadow: var(--vads-color-base-dark) 0px 0px 0px 1px;
        margin-left: 1px;
      }
    }

    &::part(description) {
      font-weight: normal;
      font-size: inherit;
      white-space: pre-line;
      margin-top: 0;
    }
  }
}

.hide-visited-link:visited {
  color: var(--vads-color-link) !important;
}

.va-breadcrumbs-li {
  padding: 5px 0 !important;
}

.include-back-arrow {
  &::before {
    content: "";
    display: inline-block;
    width: 2ex;
    height: 2ex;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22%3E%3Cpath d%3D%22M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z%22%2F%3E%3C%2Fsvg%3E"), linear-gradient(transparent, transparent);
    -webkit-mask-size: contain;
    mask-size: 2ex 2ex;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    mask-position: center center;
    bottom: -0.2em;
    position: relative;
    font-size: 16.96px;
    color: rgb(27, 27, 27);
    background: var(--vads-color-gray-medium);
  }
}

#rx-ipe-filtering-container {
  border: 2px solid var(--vads-color-base);
  background-color: var(--vads-color-base-lighter);
  border-radius: 12px;
  position: relative;

  &::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: -10px;
    right: 20px;
    z-index: 1;
    background-color: var(--vads-color-base-lighter);
    border: 2px solid transparent;
    border-top-color: var(--vads-color-base);
    border-left-color: var(--vads-color-base);
    transform: rotate(45deg);
  }
}

.tracking-alert {
  flex-wrap: wrap;
  word-wrap: break-word;
}
.tracking-info-med-list {
  list-style-type: disc;
}
