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

.plan__item {
  position: relative;

  display: flex;
  flex-direction: column;

  flex: 0 0 340px;

  min-width: 340px;

  padding: 1.5rem;

  border-radius: 18px;
  margin-bottom: 1rem;

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

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

  backdrop-filter: blur(12px);

  overflow: hidden;

  transition: all .25s ease;

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

  &:hover {
    transform: translateX(-3px);

    border-color: rgba(247, 147, 24, .18);

    box-shadow:
      0 20px 40px rgba(0,0,0,.28),
      0 0 0 1px rgba(247,147,24,.05);
  }

  &::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;
    right: 0;

    height: 1px;

    background:
      linear-gradient(
        90deg,
        transparent,
        rgba(247,147,24,.35),
        transparent
      );
  }

  > span {
    position: absolute;

    top: 1rem;
    right: 1rem;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    height: 28px;

    padding: 0 .8rem;

    border-radius: 999px;

    background: rgba(34,197,94,.08);

    border: 1px solid rgba(34,197,94,.15);

    color: #22c55e;

    font-size: .72rem;

    font-weight: 600;

    z-index: 2;
  }

  &--header {
    padding-bottom: 1rem;

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

    h3 {
      color: $col-white;

      font-size: 1.05rem;

      font-weight: 600;

      line-height: 1.2;

      margin-bottom: .8rem;
    }

    &--name {
      display: flex;

      align-items: center;

      gap: .65rem;

      h1 {
        font-size: 1rem;

        font-weight: 600;

        color: $col-white;
      }

      h4 {
        font-size: .75rem;

        font-weight: 600;

        color: #f79318;

        text-transform: uppercase;

        letter-spacing: .08em;
      }
    }
  }

  &--details {
    padding-top: 1rem;

    &--item {
      display: flex;

      align-items: center;

      justify-content: space-between;

      min-height: 42px;

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

      &:last-child {
        border-bottom: none;
      }

      h6 {
        margin: 0;

        font-size: .8rem;

        font-weight: 500;
      }

      h6:first-child {
        color: rgba(255,255,255,.55);
      }

      h6:last-child {
        color: $col-white;

        font-weight: 600;
      }
    }

    &--buttons {
      display: flex;

      gap: .75rem;

      margin-top: 1.25rem;

      padding-top: 1rem;

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

      &--edit,
      &--delete {
        flex: 1;

        height: 42px;

        display: flex;

        align-items: center;
        justify-content: center;

        gap: .5rem;

        border-radius: 12px;

        cursor: pointer;

        font-size: .82rem;

        font-weight: 600;

        transition: all .2s ease;
      }

      &--edit {
        background: rgba(34,197,94,.08);

        border: 1px solid rgba(34,197,94,.12);

        color: #22c55e;

        &:hover {
          background: rgba(34,197,94,.15);
        }
      }

      &--delete {
        background: rgba(239,68,68,.08);

        border: 1px solid rgba(239,68,68,.12);

        color: #ef4444;

        &:hover {
          background: rgba(239,68,68,.15);
        }
      }
    }
  }

  a {
    width: 100%;

    height: 44px;

    margin-top: 1.4rem;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: .75rem;

    border-radius: 12px;

    background:
      linear-gradient(
        135deg,
        #f79318,
        #ff9f2f
      );

    color: #0f1115;

    font-size: .85rem;

    font-weight: 700;

    transition: all .25s ease;

    svg {
      transition: transform .25s ease;
    }

    &:hover {
      transform: translateY(-2px);

      box-shadow:
        0 10px 25px rgba(247,147,24,.25);

      svg {
        transform: translateX(3px);
      }
    }
  }
}