.date {
  margin: 1.5rem;
  font-family: "Bender", "Noto Sans SC", "Noto Sans JP", "Noto Sans KR",
    "Noto Sans", sans-serif;
  font-weight: bold;
  text-align: right;
  color: var(--date-color);
  font-size: 1.5rem;
  letter-spacing: 0.1rem;
  flex: auto;
  user-select: none;

  @media only screen and (max-width: 430px) {
    & {
      margin: 0rem;
    }
  }
}

.container {
  color: var(--text-color-full);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 1.25rem;
  font-weight: bold;
  .title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3em;
    height: auto;
  }
  .type {
    display: flex;
    flex-direction: row;
    align-items: center;
    svg {
      width: 1.5rem;
      fill: var(--text-color);
    }
  }
}

.group {
  padding: 1rem;
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  user-select: none;

  .operator-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;

    @media only screen and (max-width: 430px) {
      & {
        width: 100%;
        padding-bottom: 1rem;
        overflow-y: hidden;
        flex-wrap: nowrap;
      }
    }
  }

  .item {
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
    width: 12rem;
    margin: 1.25rem;
    background-image: repeating-linear-gradient(
      90deg,
      var(--home-item-background-linear-gradient-color) 0,
      var(--home-item-background-linear-gradient-color) 1px,
      transparent 1px,
      transparent 5px
    );
    .background-filler {
      border-right: 1px solid var(--home-item-background-linear-gradient-color);
      position: absolute;
      top: 0;
      left: 0;
      right: -1px;
      bottom: 0;
    }
    .outline {
      display: block;
      position: absolute;
      opacity: 0;
      visibility: hidden;
      transition: all cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
      width: 100%;
      height: 100%;
      left: -6px;
      top: -6px;
      border: var(--home-item-outline-color) 1px dashed;
      padding: 6px;

      &:before,
      &:after {
        content: "";
        display: block;
        position: absolute;
        left: -3px;
        height: 3px;
        width: 100%;
        border-left: var(--text-color) solid 3px;
        border-right: var(--text-color) solid 3px;
      }

      &:before {
        top: -3px;
      }

      &:after {
        bottom: -3px;
      }
    }

    .img {
      transition: background-color cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;

      & img {
        height: auto;
        width: 100%;
        display: block;
      }
    }

    .info {
      white-space: nowrap;
      position: relative;
      padding: 0.8rem 0.4rem;
      line-height: 1.2em;
      height: 36px;

      .wrapper {
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--secondary-text-color);
        .text {
          font-size: 0.75rem;
          font-family: "Geometos", "Noto Sans SC", "Noto Sans JP",
            "Noto Sans KR", "Noto Sans", sans-serif;
          margin-top: 1rem;
        }
      }

      .background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        visibility: hidden;
        transition: all cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
        background-image: linear-gradient(
          70deg,
          transparent 40%,
          currentColor 150%
        );
      }
    }

    &:hover {
      .img {
        background-color: var(--home-item-hover-background-color);
      }
      .outline,
      .info .background {
        opacity: 1;
        visibility: visible;
      }
    }

    @media only screen and (max-width: 430px) {
      & {
        width: 8.08rem;
        margin: 1.08rem;

        .outline,
        .info .background {
          opacity: 1;
          visibility: visible;
        }
      }
    }
  }
  @media only screen and (max-width: 430px) {
    & {
      align-items: flex-start;
      flex-direction: column-reverse;
      padding-bottom: 0;
    }
  }
}

.styled-selection {
  margin-bottom: 0.8rem;

  .content {
    padding: 0.8rem 0;
    cursor: pointer;
    transition: transform cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;

    .option {
      white-space: nowrap;
      pointer-events: none;
      position: relative;
      transform: translate3d(0, 0, 1px);
      font-size: 1rem;
      padding: 0.44rem 3.25rem 0.44rem 0.63rem;
      background-color: var(--home-item-hover-background-color);
      background-image: repeating-linear-gradient(
        90deg,
        var(--home-item-background-linear-gradient-color) 0 1px,
        transparent 1px 4px
      );
      transition: transform cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;

      .outline {
        width: 100%;
        height: 100%;
        left: -6px;
        top: -6px;
        border: var(--home-item-outline-color) 1px dashed;
        padding: 6px;

        &:before,
        &:after {
          content: "";
          display: block;
          position: absolute;
          left: -2px;
          height: 2px;
          width: 100%;
          border-left: var(--text-color) solid 2px;
          border-right: var(--text-color) solid 2px;
        }

        &:before {
          top: -2px;
        }

        &:after {
          bottom: -2px;
        }
      }

      &:before,
      .outline {
        content: "";
        display: block;
        position: absolute;
        z-index: -1;
        opacity: 0;
        visibility: hidden;
        transition: opacity cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s,
          visibility cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
      }

      &:before {
        right: 0;
        top: 0;
        width: 60%;
        height: 100%;
        background-image: linear-gradient(90deg, transparent, currentColor);
      }

      .tick-icon {
        display: inline-block;
        position: absolute;
        z-index: 0;
        right: 0.31rem;
        top: 50%;
        width: 0.5rem;
        height: 1rem;
        opacity: 0;
        visibility: hidden;
        transition: opacity cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s,
          visibility cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
        border-right: var(--text-color) solid 0.25rem;
        border-bottom: var(--text-color) solid 0.25rem;
        transform: translate(-50%, -70%) rotate(45deg);
      }

      .arrow-icon {
        display: inline-block;
        position: absolute;
        z-index: 0;
        right: -0.1em;
        top: 0.55em;
        width: 2em;
        height: 1em;
        transform: rotate(90deg);
        transition: opacity cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s,
          visibility cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
        opacity: 0;
        visibility: hidden;

        .bar {
          position: absolute;
          width: 100%;
          height: 0.25em;
          background-color: var(--text-color-full);
          will-change: auto;
        }

        .bar:nth-child(1) {
          transform: rotateZ(45deg) scaleX(0.5) translateX(0.8em);
        }

        .bar:nth-child(2) {
          transform: rotateZ(-45deg) scaleX(0.5) translateX(-0.8em);
        }

        .bar:nth-child(3),
        .bar:nth-child(4) {
          transform: translateY(1em) rotateZ(90deg) scaleX(0.5);
        }
      }
    }

    &:hover,
    &.active {
      transform: translate3d(6px, 0, 1px);

      .option:before,
      .option .outline {
        opacity: 1;
        visibility: visible;
      }

      .arrow-icon {
        opacity: 1;
        visibility: visible;
      }
    }

    &.active {
      .option .tick-icon {
        opacity: 1;
        visibility: visible;
      }
    }
  }
}

.no-overflow {
  overflow: hidden;
  text-overflow: ellipsis;
}
