@use "../../../../styles/abstracts/variables" as *;
@use "../../../../styles/abstracts/mixins" as *;

.course {
  @include pageBase;

  & {
    height: auto;
  }

  &--header {
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-gap: 30px;

    h1 {
      color: $col-white;
      font-weight: 500;
      font-size: 1.2rem;
    }

    p {
      color: $col-white;
      opacity: 0.85;
      font-size: 0.8rem;
      line-height: 1.6rem;
      padding-top: 0.5rem;
    }

    button {
      margin-top: 1rem;
      border: none;
      background: $col-orange;
      color: $col-dark;
      font-weight: 500;
      padding: 0.5rem 1rem;
      border-radius: 3px;
      font-size: 0.85rem;
      transition: all ease-in-out 0.5s;

      &:hover {
        background: #ff8c42 !important;
      }

      @media only screen and (max-width: 1000px) {
        width: 100%;
        padding: 0.7rem 1rem;
        font-weight: 600;
        font-size: 0.9rem;
      }
    }

    img {
      border-radius: 10px;
    }

    @media only screen and (max-width: 1000px) {
      display: flex;
      flex-direction: column;
    }
  }

  &--content {
    border: 1px solid $col-border-lining;
    margin-top: 2rem;

    &--children {
      padding: 1rem 2rem;

      @media only screen and (max-width: 1000px) {
        padding: 1rem 1rem;
      }
    }

    &--tab {
      background: #1a1a1a;
      border: 1px solid $col-border-lining;
      margin-bottom: 1.5rem;
      display: flex;
      width: 100%;
      padding: 0.5rem !important;
      align-items: center;
      font-size: 0.8rem;
      font-weight: 400;
      flex-wrap: nowrap;
      overflow-x: auto;
      gap: 20px;

      &--item {
        text-align: center;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        flex: 0 0 120px;
        color: $col-white;

        @media only screen and (max-width: 1000px) {
          flex: 0 0 120px;
          width: 100%;
          font-size: 0.75rem;
        }

        &--active {
          background: $col-active-btn-bg;
          color: $col-white;
          border-radius: 6px;
          padding: 0.5rem 1rem;
          cursor: pointer;
          font-size: 0.85rem;
          font-weight: 400;
          flex: 0 0 170px;
          text-align: center;

          @media only screen and (max-width: 1000px) {
            width: 100%;
            flex: 0 0 180px;
            text-align: center;
            font-size: 0.75rem;
          }
        }
      }
    }
  }

  // Skeleton Styles
  .skeleton-title {
    width: 80%;
    height: 24px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
  }

  .skeleton-paragraph {
    width: 100%;
    height: 14px;
    background: #2a2a2a;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    animation: pulse 1.5s infinite ease-in-out;
  }

  .skeleton-button {
    width: 100%;
    height: 36px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-top: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
  }

  .skeleton-thumbnail {
    width: 100%;
    max-width: 400px;
    height: 220px;
    border-radius: 10px;
    background: #2a2a2a;
    animation: pulse 1.5s infinite ease-in-out;
  }

  .skeleton-tab {
    width: 120px;
    height: 36px;
    border-radius: 6px;
    background: #2a2a2a;
    animation: pulse 1.5s infinite ease-in-out;
  }

  .skeleton-block {
    height: 80px;
    width: 100%;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 1rem;
    animation: pulse 1.5s infinite ease-in-out;
  }

  @keyframes pulse {
    0% {
      background-color: #2a2a2a;
    }
    50% {
      background-color: #3b3b3b;
    }
    100% {
      background-color: #2a2a2a;
    }
  }
}
