@import "./tag.scss";
@import "./badge.scss";
@import "../../../assets/css/mixins/card";

.restaurant-item {
  @include card;
  width: 310px;
  height: 346px;
  margin: 1rem;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s;

  @media (min-width: 420px) {
    width: 333px;
  }

  > a {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: black;
  }

  .restaurant-image {
    position: relative;

    .restaurant-banner {
      position: relative;
      width: 100%;
      aspect-ratio: 16/9;
      margin-bottom: -50px;
      overflow: hidden;
      display: flex;
      align-items: center;

      img {
        width: 100%;
      }
    }

    .restaurant-logo {
      --size: 64px;
      width: calc(var(--size) + 16px);
      height: calc(var(--size) + 16px);
      position: relative;
      display: inline-block;
      background-color: white;
      border-radius: 16px;
      padding: 8px;
      margin-left: 16px;

      > img {
        width: var(--size);
        height: var(--size);
        border-radius: 8px;
      }
    }

    .badges {
      position: absolute;
      top: 0;
      left: 0;
      padding: 8px;
      padding: 12px;
      display: flex;
      gap: 8px;
      width: 100%;
      flex-wrap: wrap;
    }
  }

  .restaurant-details {
    width: 100%;
    height: 100%;
    padding: 24px;
    padding-top: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 16px;

    h4 {
      color: black;
      font-size: 16px;
      font-weight: bold;
      margin: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      line-height: inherit;
    }

    .details {
      display: flex;
      gap: 8px;
      overflow-x: hidden;

      span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
    }
  }

  .timing {
    span {
      display: flex;
      align-items: center;
      gap: 4px;
      --size: 20px;
      font-weight: 600;

      &.pre-order {
        font-weight: normal;

        svg {
          --size: 18px;
        }
      }
    }
    svg {
      height: var(--size);
      width: var(--size);
    }
  }
}
