@use 'ui-design-system/src/styles/semantic/index' as *;

.pricing-table {
  padding: 6rem 0;
  background: #ffffff;

  &__header {
    text-align: center;
    margin-bottom: 3rem;
  }

  &__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
  }

  &__plan {
    background: #f8fafc;
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    
    &:hover {
      transform: translateY(-4px);
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    }

    &--popular,
    &--highlighted {
      border-color: #3b82f6;
      transform: scale(1.05);
      z-index: 1;
      box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

      &:hover {
        transform: scale(1.05) translateY(-4px);
      }
    }
  }
}

.billing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;

  &__label {
    font-size: 1rem;
    font-weight: 500;
    color: #6b7280;
    transition: color 0.2s;

    &--active {
      color: #1f2937;
      font-weight: 600;
    }
  }

  &__discount {
    display: inline-block;
    margin-left: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: #dcfce7;
    color: #166534;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 0.25rem;
  }
}

.pricing-plan {
  &__badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #3b82f6;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
  }

  &__header {
    text-align: center;
    margin-bottom: 2rem;
  }

  &__name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 0.5rem;
  }

  &__description {
    color: #6b7280;
    font-size: 1rem;
  }

  &__price {
    text-align: center;
    margin-bottom: 3rem;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.25rem;
  }

  &__currency {
    font-size: 1.25rem;
    font-weight: 500;
    color: #6b7280;
  }

  &__amount {
    font-size: 3rem;
    font-weight: bold;
    color: #1f2937;
  }

  &__suffix {
    font-size: 1rem;
    color: #6b7280;
    margin-left: 0.5rem;
  }

  &__features {
    list-style: none;
    padding: 0;
    margin: 0 0 3rem 0;
  }

  &__feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;

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

    &--highlight {
      background: #eff6ff;
      margin: 0 -1rem;
      padding: 1rem;
      border-radius: 0.5rem;
      border-bottom: none;
    }

    &--excluded {
      opacity: 0.6;
      
      .pricing-plan__feature-text {
        text-decoration: line-through;
        color: #9ca3af;
      }
    }
  }

  &__feature-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    margin-top: 2px;

    &--check {
      background: #dcfce7;
      color: #166534;
      
      &::after {
        content: '✓';
        font-size: 12px;
        font-weight: bold;
      }
    }

    &--cross {
      background: #fee2e2;
      color: #dc2626;
      
      &::after {
        content: '✕';
        font-size: 12px;
        font-weight: bold;
      }
    }
  }

  &__feature-text {
    font-size: 1rem;
    color: #1f2937;
    line-height: 1.5;
  }

  &__cta {
    text-align: center;
  }

  &__button {
    width: 100%;
    font-weight: 600;
  }
}