#size-chart-modal {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00000066;
  transition: all .5s;
  z-index: 100;

  &.show {
    visibility: visible;
    opacity: 1;
    transition: all .5s;
  }

  .size-chart-modal-content {
    position: relative;
    max-width: calc(100vw - 30px);
    max-height: calc(100vh - 200px);
    overflow: auto;
    color: #232323;
    width: 840px;
    background: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px 40px;

    @media (max-width: 1023px) {
      padding: 10px;
      padding-top: 20px;
      max-width: calc(100vw - 20px);
      max-height: calc(100vh - 100px);
      width: 80%;
    }

    @media (max-width: 576px) {
      width: 100%;
    }
  }

  #close-size-chart {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    width: 15px;
    height: 15px;
    position: absolute;
    right: 20px;
    top: 20px;

    @media (max-width: 1023px) {
      right: 10px;
      top: 10px;
    }
  }

  .size-chart-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;

    h3 {
      margin: 0;
      font-weight: bold;
    }
  }

  .unit-toggle {
    margin-left: auto;
    margin-top: 10px;
    margin-bottom: 10px;
  }

  .size-tabs {
    width: 100%;
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;

    @media (max-width: 767px) {
      flex-wrap: wrap;
      margin-bottom: -1px;
      position: relative;
    }
  }

  .size-tab-button {
    flex: auto;
    background: #fff;
    color: #d8d8d8;
    border: none;
    border-bottom: 1px solid #d8d8d8;
    padding: 6px;
    font-size: 16px;
    cursor: pointer;
    letter-spacing: .3em;
    text-transform: uppercase;

    @media (max-width: 1023px) {
      font-size: 12px;
      padding: 12px 0;
    }

    @media (max-width: 767px) {
      flex: 1 1 50%;

      &:nth-child(n+3) {
        flex-basis: 33.33%;
      }
    }

    @media (hover:hover) {
      &:hover {
        color: #232323;
        border-bottom-color: #232323;
      }
    }

    &.active {
      color: #232323;
      border-bottom-color: #232323;
    }
  }

  .size-tab-content {
    display: none;

    &.active {
      display: block;
    }

    td,
    th {
      color: rgba(var(--color-foreground), 0.75);

      @media (max-width: 1023px) {
        font-size: 12px;
      }
    }
  }

  .size-chart-modal-footer {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 10px;

    @media (max-width: 1023px) {
      margin-top: 20px;
      margin-bottom: 20px;
      gap: 10px;
    }

    a,
    button {
      flex: 1;
      display: block;
      border: 1px solid #d8d8d8;
      text-decoration: none;
      background: none;
      font-size: 15px;
      color: #232323bf;
      cursor: pointer;
      padding: 5px 10px;
      letter-spacing: .125em;
      border-radius: 6px;
      text-transform: uppercase;
      font-weight: bold;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
      text-align: left;

      svg {
        width: 18px;
      }

      br {
        display: none;
      }

      @media (max-width: 1023px) {
        font-size: 12px;
        padding: 8px;

        svg {
          width: 14px;
        }
      }

      @media (max-width: 576px) {
        line-height: 1.25;

        br {
          display: block;
        }
      }

      &:hover {
        background: #232323;
        color: #fff;
        border-color: #232323;

        svg {
          fill: #fff;
        }
      }
    }

    .link-with-border-top {
      width: 100%;
      flex: 100%;
      border: none;
      position: relative;
      margin-top: 0;
      padding-top: 20px;

      &::before {
        content: "";
        width: 100%;
        position: absolute;
        height: 1px;
        background: #d8d8d8;
        top: 0px;
      }

      &:hover {
        background: unset;
        border-color: #d8d8d8;
        color: #000;
      }
    }
  }

  .table-container table {
    min-width: unset;
  }
}