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

.selected__category {
  @include dashPageComponent;

  & {
    margin-top: 1rem;
    width: 100%;
    overflow-x: hidden;
    background:
    radial-gradient(
      circle at top right,
      rgba(255, 140, 66, 0.05),
      transparent 35%
    ),
    #101012;
  }

  @media only screen and (max-width: 1000px) {
    margin-top: 0.5rem;
  }

  &--header {
  position: relative;

  padding: 0.75rem 0 1.75rem;

  margin-bottom: 1.5rem;

  border-bottom: 1px solid rgba(255, 255, 255, 0.06);

  &::after {
    content: "";

    position: absolute;

    bottom: -1px;
    left: 0;

    width: 90px;
    height: 2px;

    border-radius: 999px;

    background: linear-gradient(
      90deg,
      rgba(255, 140, 66, 0.9),
      rgba(255, 140, 66, 0.2)
    );
  }

  &--content {
    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 2rem;

    width: 100%;

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

      gap: 1.5rem;
    }

    > div:first-child {
      flex: 1;

      min-width: 0;
    }
  }
}

.categoryTag {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  height: 30px;

  padding: 0 0.9rem;

  border-radius: 999px;

  background: rgba(255, 140, 66, 0.08);

  border: 1px solid rgba(255, 140, 66, 0.18);

  color: #ff9d57;

  font-size: 0.7rem;

  font-weight: 500;

  letter-spacing: 0.08em;

  text-transform: uppercase;

  margin-bottom: 1rem;
}

.selected__category--header {
  h1 {
    color: $col-white;

    font-size: 1rem;

    font-weight: 500 !important;

    line-height: 1.05;

    letter-spacing: -0.04em;

    margin-bottom: 1rem;

    max-width: 700px;

    @media only screen and (max-width: 1000px) {
      font-size: 1.65rem;
    }
  }

  p {
    max-width: 720px;

    color: rgba(255, 255, 255, 0.68);

    font-size: 0.85rem;

    line-height: 1.9;

    font-weight: 400 !important;

    position: relative;

    padding-left: 1rem;

    @media only screen and (max-width: 1000px) {
      font-size: 0.8rem;

      line-height: 1.8;
    }

    &::before {
      content: "";

      position: absolute;

      left: 0;
      top: 0.35rem;

      width: 3px;

      height: calc(100% - 0.7rem);

      border-radius: 999px;

      background: rgba(255, 140, 66, 0.7);
    }
  }
}

.headerStats {
  display: flex;

  gap: 1rem;

  flex-shrink: 0;

  @media only screen and (max-width: 1000px) {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(2, 1fr);
  }
}

.headerStat {
  min-width: 140px;

  padding: .7rem 1.15rem;

  border-radius: 14px;

  background: rgba(255, 255, 255, 0.02);

  border: 1px solid rgba(255, 255, 255, 0.06);

  backdrop-filter: blur(10px);

  transition: all 0.25s ease;

  &:hover {
    border-color: rgba(255, 140, 66, 0.18);

    background: rgba(255, 255, 255, 0.03);
  }

  span {
    display: block;

    font-size: 0.7rem;

    text-transform: uppercase;

    letter-spacing: 0.08em;

    color: rgba(255, 255, 255, 0.45);

    margin-bottom: 0.55rem;
  }

  h3 {
    font-size: .9rem;

    font-weight: 500;

    color: $col-white;

    line-height: 1;
    padding-bottom: .1rem;

    margin: 0;
  }

  h1 {
    color: $col-white;

    font-size: 1.2rem;

    font-weight: 600 !important;

    letter-spacing: -0.03em;

    line-height: 1.1;

    margin-bottom: 0.8rem;

    text-transform: capitalize;

    @media only screen and (max-width: 1000px) {
      font-size: 1.35rem;
    }
  }

  p {
    max-width: 780px;

    color: rgba(255, 255, 255, 0.72);

    font-size: 0.92rem;

    line-height: 1.9;

    font-weight: 400;

    letter-spacing: 0.01em;

    margin: 0;

    position: relative;

    padding-left: 1rem;

    @media only screen and (max-width: 1000px) {
      font-size: 0.85rem;

      line-height: 1.8;

      padding-left: 0.8rem;
    }

    &::before {
      content: "";

      position: absolute;

      left: 0;
      top: 0.4rem;

      width: 3px;
      height: calc(100% - 0.8rem);

      border-radius: 999px;

      background: rgba(255, 140, 66, 0.7);
    }
  }
}

  &--content {
    // border: 1px solid $col-border-lining;
    // padding: 1.5rem;
    border-radius: 6px;
    margin-top: 1.5rem;
    display: flex;
    overflow-x: auto;
    flex-wrap: nowrap;
    gap: 25px;
    padding-bottom: 0.5rem;

    @media only screen and (max-width: 1000px) {
      flex-direction: column;
      gap: 5px;
      // padding: 1rem;
    }
  }

  // === Skeleton Card Styles (used alongside .plan__item) ===
  &--skeleton {
    position: relative;

    display: flex;
    flex-direction: column;

    flex: 0 0 340px;

    min-width: 340px;

    padding: 1.5rem;

    border-radius: 18px;

    background:
      linear-gradient(
        180deg,
        rgba(255,255,255,.02),
        rgba(255,255,255,.01)
      );

    border: 1px solid rgba(255,255,255,.06);

    overflow: hidden;

    gap: 1rem;

    @media only screen and (max-width: 1000px) {
      min-width: 100%;
      flex: 0 0 auto;
    }

    &::before {
      content: "";

      position: absolute;

      top: 0;
      left: -150%;

      width: 50%;
      height: 100%;

      background:
        linear-gradient(
          90deg,
          transparent,
          rgba(255,255,255,.08),
          transparent
        );

      animation: skeletonShimmer 1.8s infinite;

      transform: skewX(-18deg);

      z-index: 1;
    }

    .skeleton-badge {
      position: absolute;

      top: 1rem;
      right: 1rem;

      width: 70px;
      height: 26px;

      border-radius: 999px;

      background: rgba(255,255,255,.06);
    }

    .plan__item--header {
      position: relative;

      z-index: 2;

      padding-bottom: 1rem;

      border-bottom: 1px solid rgba(255,255,255,.05);

      .skeleton-title {
        width: 65%;

        height: 24px;

        border-radius: 8px;

        background: rgba(255,255,255,.06);

        margin-bottom: .9rem;
      }

      &--name {
        display: flex;

        align-items: center;

        gap: .75rem;

        .skeleton-subtitle {
          width: 90px;

          height: 16px;

          border-radius: 6px;

          background: rgba(255,255,255,.05);

          &.small {
            width: 60px;

            height: 14px;
          }
        }
      }
    }

    .plan__item--details {
      position: relative;

      z-index: 2;

      padding-top: .25rem;

      &--item {
        display: flex;

        justify-content: space-between;

        align-items: center;

        height: 42px;

        border-bottom: 1px solid rgba(255,255,255,.03);

        .skeleton-detail-title {
          width: 80px;

          height: 12px;

          border-radius: 4px;

          background: rgba(255,255,255,.05);
        }

        .skeleton-detail-value {
          width: 55px;

          height: 12px;

          border-radius: 4px;

          background: rgba(255,255,255,.08);
        }
      }

      &--buttons {
        margin-top: 1.2rem;

        .skeleton-button {
          width: 100%;

          height: 46px;

          border-radius: 12px;

          background: rgba(255,255,255,.06);
        }
      }
    }
  }

  @keyframes skeletonShimmer {
    0% {
      left: -150%;
    }

    100% {
      left: 150%;
    }
  }
}

// === Global Pulse Animation ===
:global {
  @keyframes pulse {
    0% {
      background-color: #2a2a2a;
    }
    50% {
      background-color: #3b3b3b;
    }
    100% {
      background-color: #2a2a2a;
    }
  }
}
