/* Pricing Card Component */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.pricing-card {
  background-color: #ffffff;
  border: 1.5px solid var(--md-sys-color-outline);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: transform 0.25s ease, border-color 0.25s ease;
  overflow: hidden;

  /* AWS-style animation properties */
  backface-visibility: hidden;
  transform-style: preserve-3d;
  opacity: 0;
  transform: translate(-5px, 80px);
  animation: pricingCardSlideIn 0.4s cubic-bezier(0.2, 0.6, 0.4, 1) forwards,
             pricingCardFadeIn 0.4s cubic-bezier(0.4, 0.6, 0.6, 1) forwards;
}

.pricing-grid .pricing-card:nth-child(1) {
  animation-delay: 0.1s;
}

.pricing-grid .pricing-card:nth-child(2) {
  animation-delay: 0.2s;
}

.pricing-grid .pricing-card:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes pricingCardSlideIn {
  to {
    transform: translate(0px, 0px);
  }
}

@keyframes pricingCardFadeIn {
  to {
    opacity: 1;
  }
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: transparent;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
  pointer-events: none;
}

.pricing-card > * {
  position: relative;
  z-index: 1;
}

.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--md-sys-color-primary);
  background-color: #ffffff;
}

.pricing-card:hover::before {
  opacity: 1;
}

.pricing-card.popular {
  border-color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-secondary-container);
  box-shadow: var(--md-sys-elevation-level2);
  animation: pricingCardSlideInPopular 0.4s cubic-bezier(0.2, 0.6, 0.4, 1) forwards,
             pricingCardFadeIn 0.4s cubic-bezier(0.4, 0.6, 0.6, 1) forwards;
}

@keyframes pricingCardSlideInPopular {
  to {
    transform: translate(0px, 0px) scale(1.05);
  }
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 0.5rem 1.5rem;
  border-radius: var(--md-sys-shape-corner-full);
  font-family: var(--md-sys-typescale-label-medium-font-family);
  font-size: var(--md-sys-typescale-label-medium-font-size);
  font-weight: var(--md-sys-typescale-label-medium-font-weight);
}

.tld-name {
  font-family: var(--md-sys-typescale-headline-small-font-family);
  font-size: var(--md-sys-typescale-headline-small-font-size);
  font-weight: var(--md-sys-typescale-headline-small-font-weight);
  color: var(--md-sys-color-on-background);
  margin-bottom: 1rem;
}

.price {
  margin-bottom: 2rem;
}

.amount {
  font-family: var(--md-sys-typescale-display-small-font-family);
  font-size: var(--md-sys-typescale-display-small-font-size);
  font-weight: var(--md-sys-typescale-display-small-font-weight);
  color: var(--md-sys-color-primary);
}

.period {
  font-size: var(--md-sys-typescale-body-large-font-size);
  color: var(--md-sys-color-on-surface-variant);
}

.features {
  list-style: none;
  margin-bottom: 2rem;
  text-align: left;
}

.features li {
  padding: 0.5rem 0;
  color: var(--md-sys-color-on-surface-variant);
  position: relative;
  padding-left: 1.5rem;
  font-size: var(--md-sys-typescale-body-medium-font-size);
}

.features li:before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--md-sys-color-success);
  font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }

  .pricing-card.popular {
    transform: none;
  }
}
