@import url('https://fonts.googleapis.com/css2?family=Merienda:wght@300..900&family=Space+Grotesk:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@100..900&display=swap');

@import url("./root.css");
@import url("./theme.css");
@import url("./animation.css");
@import url("./action.css");


* {
  margin: 0;
  font-family: var(--font-body),
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  box-sizing: border-box;
  transition: all 0.35s linear;
  line-height: 1.5;
  color: var(--text-primary);
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--text-accent);
}

::selection {
  background-color: var(--text-primary);
  color: var(--surface-base);
}

body {
  background-color: var(--surface-base);
  position: relative;
  isolation: isolate;
}

/**
* Social Links
*/
.social {
  padding: 1rem .5rem;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: .25rem;
  justify-content: center;

  & a {
    font-size: var(--font-icon-size);
    width: 2.5rem;
    aspect-ratio: 1/1;
    display: grid;
    place-content: center;
    border-radius: var(--round-small);
    padding: .25rem;

    & i {
      color: var(--icon-color);
    }

    &:hover,
    &:focus {
      outline: none;

      & i {
        color: var(--icon-hover);
      }
    }
  }
}

/**
* Header section
*/

header {
  text-align: center;
  max-width: var(--content-width);
  width: 100%;
  margin: auto;
  padding: 1rem;

  &.no-banner {
    padding: 3rem 1.5rem;
    background-color: var(--surface-raised);
    border-radius: var(--round);
  }

  .banner {
    width: 100%;
    height: 220px;
    border-radius: var(--round);
    background-image: var(--banner);
    background-size: cover;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    transition: none;
    display: none;

    &.show {
      display: block;
    }
  }

  .name {
    text-transform: capitalize;
    font-size: 1.5rem;
    font-size: clamp(1.5rem, 7vw, 2.5rem);
    /* font-weight: 600; */
    padding-block: 1rem .5rem;
    font-family: var(--font-head);
    color: var(--text-accent)
  }

  .about {
    padding-inline: 1rem;
    opacity: .75;
    font-size: .85rem;
    max-width: 640px;
    margin-inline: auto;
  }
}

/**
* Main section of the website
* This section contains the main content of the website
* and is divided into two parts: the tab group and the menu list.
* The tab group contains the different tabs that the user can click on 
*/
main {
  margin: auto;
  border-radius: 2rem;
  max-width: var(--content-width);
  width: 100%;

  & aside {
    grid-area: tabGroup;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .tabGroup {
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-direction: row;
    gap: .5rem;
    justify-content: center;
    flex-wrap: wrap;


    .tab {
      padding: .5rem 1rem;
      text-transform: capitalize;
      border-radius: var(--round-small);
      color: var(--text-primary);
      cursor: pointer;
      outline: 1px solid var(--border-default);
      font-weight: 500;

      &.active {
        background-color: var(--surface-accent);
        color: var(--surface-base);
        outline: none;
      }

      &:hover:not(.active) {
        color: var(--text--primary);
        outline-color: var(--border-hover);
      }
    }
  }

  /**
* Items List
*/
  .content {
    grid-area: menuList;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem;

    .item {
      background-color: var(--surface-raised);
      padding: 1.25rem;
      border-radius: var(--round);
      position: relative;

      .title {
        font-family: var(--font-head), sans-serif;
        font-size: 1.25rem;
        color: var(--text-accent);
      }

      .detail {
        padding-block: .5rem;
        font-size: .8125rem;
        opacity: .85;
      }

      .price {
        font-size: 1rem;
        font-weight: 600;

        & span {
          opacity: .65;
        }
      }

      & .type {
        padding-inline: .75rem;
        text-transform: capitalize;
        opacity: .8;

        &::before {
          content: "-";
          padding-inline-end: .75rem;
          opacity: .65;
        }
      }
    }
  }
}

footer {
  text-align: center;
  padding: 1.5rem;
  max-width: var(--content-width);
  width: 100%;
  margin: auto;
}

/* For mobile screen */
@media screen and (max-width: 560px) {
  header .banner {
    height: 140px;
  }

  main section {
    display: grid;
    grid-template-areas: 'tabGroup'
      'menuList';

    & aside {
      width: 100%;
      overflow-x: scroll;
      scrollbar-width: thin;

      &::-webkit-scrollbar {
        height: 3px;
        background-color: var(--surface-tooltip);
        /* Adjust scrollbar height */
      }

      &::-webkit-scrollbar-thumb {
        background: var(--surface-accent);
        border-radius: 10px;
      }

      & .tabGroup {
        width: max-content;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        backdrop-filter: blur(16px);

        .tab {
          font-size: .8rem;
        }
      }
    }
  }
}

/* For tablet screen and desktop */
@media screen and (min-width: 560px) {
  header.no-banner {
    margin-top: 1rem;
  }

  main section {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 160px 1fr;
    grid-template-areas: 'tabGroup menuList';

    .tabGroup {
      flex-direction: row;
      justify-content: flex-start;
    }
  }
}