.dialog {
  position: relative;

  & .dialog__trigger {
    cursor: pointer;
  }

  & .dialog__content-wrapper {
    width: 100%;
    z-index: 999999999;
  }

  & .dialog__content {
    width: 100%;
    position: relative;
    
    @media screen and (min-width: 768px) {
      width: 90%;
    }
  }
}

.course-menu-wrapper {
  display: grid;
  gap: 1rem;
  
  @media screen and (min-width: 600px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media screen and (min-width: 768px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media screen and (min-width: 1024px) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.course-menu {
  & .dialog__trigger {
    display: flex;
    flex-direction: column;
    border-radius: 3rem;
    background-color: var(--snow);
    gap: 1.25rem;
    padding: 1rem;
    transition: opacity 300ms linear;
    
    @media screen and (min-width: 768px) {
      flex-direction: row;
    }
    
    &:hover {
      opacity: 0.85;
      & .dialog__image img {
        transform: scale(1.1);
      }
    }
  
    & .dialog__image {    
      @media screen and (min-width: 768px) {
        max-width: 40%;
        flex: 1 0 0%;
      }

      & > div {
        position: relative;
        padding-top: 66.6667%;
        border-radius: 2rem;
        overflow: hidden;
      }

      & img {
        object-fit: cover;
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 100%;
        transition: transform linear 300ms;
      }
    }

    & .dialog__box {
      position: relative;
      display: flex;
      flex-direction: column;
      gap: 0.5rem;

      @media screen and (min-width: 768px) {
        flex: 1 0 0%;
        padding-top: 0.875rem;
      }

      & .dialog__title-box {
        position: relative;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        align-items: baseline;

        & .dialog__title {
          line-height: 1.25;
          font-weight: 500;
          font-size: 1.125rem;
          position: relative;
          z-index: 2;
          @media screen and (min-width: 1024px) {
            font-size: 1.25rem;
          }
        }

        & .dialog__price {
          line-height: 1.25;
          font-weight: 500;
          font-size: 1rem;
          color: var(--sky-2);
        }
      }

      & .dialog__text {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        font-size: 0.875rem;
        color: var(--ink-alt);
      }
    }
  }
  
  & .dialog__content {
    background-color: var(--snow);
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
    container-type: inline-size;

    @media screen and (min-width: 768px) {
      border-radius: 1rem;
    }
    
    & .dialog__head {
      display: flex;
      align-items: center;
      gap: 0.25rem;
      padding: 1.25rem 1rem;
      border-bottom: 2px solid hsl(from var(--sky-2) h s l / 70%);
      
      @container (min-width: 768px) {
        padding: 1.5rem 1.25rem;
      }
      
      & .dialog__heading-2 {
        flex: 1 1 0%;
        font-weight: 700;
        text-align: center;
        font-size: 1.125rem;
        line-height: 1.25;
        
        @container (min-width: 768px) {
          font-size: 1.5rem;
        }
        @container (min-width: 1024px) {
          font-size: 2rem;
        }
      }
      
      & .dialog__close {
        width: 1.75rem;
        height: 1.75rem;
        position: relative;
        
        &::before, &::after {
          content: "";
          display: block;
          width: 1.5rem;
          height: 0.125rem;
          background-color: var(--blue);
          transform-origin: center;
          position: absolute;
          top: 50%;
          left: 50%;
        }
        &::before {
          transform: translate(-50%, -50%) rotate(45deg);   
        }
        &::after {
          transform: translate(-50%, -50%) rotate(-45deg);  
        }

        @container (min-width: 768px) {
          width: 2rem;
          height: 2rem;
          &::before, &::after {
            width: 1.875rem;
          }
        }
      }
    }
    
    & .dialog__body {
      display: flex;
      flex-direction: column;
      gap: 2rem;
      padding: 2rem 1rem;
      
      @container (min-width: 768px) {
        padding-left: 2rem;
        padding-right: 2rem;
      }
      
      @container (min-width: 1024px) {
        flex-direction: row;
        padding-left: 2.5rem;
        padding-right: 2.5rem;
      }
      
      & .dialog__image {
        
        @container (min-width: 768px) {
          flex: 1 0 0%;
          max-width: 45%;
        }
        
        & img {
          object-fit: cover;
          border-radius: 1rem;
          aspect-ratio: 3 / 2;
          
          @container (min-width: 768px) {
            position: sticky;
            border-radius: 2rem;
            top: 3rem;
          }
        }
      }
      
      & .dialog__container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        
        @container (min-width: 768px) {
          flex: 1 0 0%;
        }
        
        & .dialog__title-box {
          display: flex;
          gap: 0.5rem;
          align-items: center;
          
          & dialog__emoji {
            font-size: 1.125rem;
          }
          
          & .dialog__heading-3, & .dialog__heading-4 {
            flex: 1 0 0%;
          }
        }
        
        & .dialog__heading-3 {
          line-height: 1.25;
          font-weight: 500;
          font-size: 1.25rem;
        }
        
        & .dialog__heading-4 {
          line-height: 1.25;
          font-weight: 500;
          font-size: 1.125rem;
        }
        
        & .dialog__text-box {
          display: flex;
          flex-direction: column;
          gap: 0.5rem;
          line-height: 1.8;
          font-size: 0.875rem;
        }
        
        & .dialog__items-box {
          display: flex;
          flex-direction: column;
          gap: 1rem;
        }
        
        & .dialog__list {
          display: flex;
          flex-direction: column;
          gap: 0.25rem;
          padding-left: 1.5rem;
          list-style: disc outside none;

          & > p {
            margin: 0;
            display: list-item;
          }
        }
      }
    }
  }
}











