@use '../../_global/styles/mixins';
@use '../../_global/styles/vars';
@use '../../sections/superlist/superlist';

.superlist-entry {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 0 0 20px 0;
  &:before {
    content: '';
    display: block;
    position: absolute;
    left: 29px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--color-button-primary-background);
    @media (min-width: 768px) {
      left: 59px;
    }
  }
  &:first-child {
    &:before {
      top: 50%;
      height: 50%;
    }
  }
  &:last-child {
    &:before {
      height: 50%;
    }
  }
  &:only-child {
    &:before {
      display: none;
    }
  }
  @media (max-width: 399px) {
    &:before {
      display: none;
    }
  }
  .graphic {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    background: var(--color-background);
    border-radius: 50%;
    @media (min-width: 768px) {
      width: 120px;
      height: 120px;
    }
    .icon-box {
      position: relative;
      width: 100%;
      height: auto;
      font-family: "Pictograms", sans-serif;
      font-size: 35px;
      line-height: 60px;
      text-align: center;
      color: var(--color-text);
      @media (min-width: 768px) {
        line-height: 120px;
        font-size: 70px;
      }
    }
    @media (max-width: 399px) {
      display: none;
    }
  }
  .textbox {
    flex: 1;
    padding: 15px;
    background: var(--color-background);
    color: var(--color-text);
    border-radius: var(--border-radius-sm);
    @media (min-width: 768px) {
      padding: 30px;
      border-radius: var(--border-radius-md);
    }
    h3, .like-h3 {
      margin-top: 0;
      margin-bottom: 5px;
      font-size: 20px;
      @media (min-width: 768px) {
        font-size: 28px;
      }
    }
    p {
      font-size: 16px;
      @media (min-width: 768px) {
        font-size: 18px;
      }
    }
  }
  &.inverted {
    &:before {
      background-color: var(--color-background);
    }
    .textbox {
      .btn {
        --button-bg-color: var(--color-button-tertiary-background);
        --button-text-color: var(--color-button-tertiary-text);
        --button-hover-shadow-opacity: 0.35;
      }
    }
  }
}

.superlist.centered {
  .superlist-entry {
    display: flex;
    justify-content: flex-end;
    gap: 0;
    min-height: 120px;
    padding: 0 0 40px 0;

    &:before {
      left: 29px;
      background: var(--color-decoration);
      @media (min-width: 768px) {
        left: calc(50% - 1px);
      }
    }
    &:first-child {
      &:before {
        top: 30px;
        height: calc(100% - 30px);
        @media (min-width: 768px) {
          top: 60px;
          height: calc(100% - 60px);
        }
      }
    }
    &:last-child {
      &:before {
        display: none;
      }
    }

    .graphic {
      position: absolute;
      left: 0;
      top: 0;
      background: var(--color-decoration);
      @media (min-width: 768px) {
        left: 50%;
        transform: translate(-50%, 0);
      }
      .icon-box {
        color: var(--color-background);
      }
    }
    .textbox {
      padding: 18px 0 0 0;
      background: none;
      border-radius: 0;
      margin-left: 76px;
      @media (min-width: 768px) {
        padding: 15px 0 0 0;
        flex: 0 0 calc(50% - 90px);
        margin-left: 0;
      }
      @media (max-width: 399px) {
        margin-left: 0;
      }
      h3, .like-h3 {
        padding-bottom: 9px;
        margin-bottom: 11px;
        border-bottom: 1px solid var(--color-surface-inset);
        @media (min-width: 768px) {
          margin-top: 3px;
          margin-bottom: 9px;
        }
      }
      .btn {
        --button-bg-color: var(--color-button-tertiary-background);
        --button-text-color: var(--color-button-tertiary-text);
        --button-hover-shadow-opacity: 0.35;
      }
    }
    &:nth-child(2n) {
      justify-content: flex-start;
    }
    &.inverted {
      &:before {
        background-color: var(--color-decoration);
      }
      .textbox {
        background: none;
        .btn {
          --button-bg-color: var(--color-button-tertiary-background);
            --button-text-color: var(--color-button-tertiary-text);
          --button-hover-shadow-opacity: 0.35;
        }
      }
    }
  }
}
