/* ========================================
   Trial CTA Styles
   Prominent trial promotion elements
   ======================================== */

/* --------------------------------
   Trial Banner (top of page)
   -------------------------------- */
.trial-banner {
  background: linear-gradient(90deg, #00D4FF, #8B5CF6, #00D4FF);
  background-size: 200% 100%;
  animation: trialBannerSlide 0.4s ease-out, bannerGradientScroll 6s linear infinite;
  color: white;
  padding: 0.75rem 1rem;
  position: fixed;
  top: var(--header-height, 88px);
  left: 0;
  right: 0;
  z-index: 999;
}

@keyframes bannerGradientScroll {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes trialBannerSlide {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.trial-banner-hidden {
  display: none;
}

.trial-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.trial-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.trial-banner-icon svg {
  width: 20px;
  height: 20px;
  animation: trialPulse 2s ease-in-out infinite;
}

@keyframes trialPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.trial-banner-text {
  font-size: 0.9375rem;
  text-align: center;
}

.trial-banner-text strong {
  font-weight: 600;
}

.trial-banner-btn {
  background: white !important;
  color: #000000 !important;
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.trial-banner-btn:hover {
  background: #f0f0f0;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.trial-banner-close {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  opacity: 0.7;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trial-banner-close:hover {
  opacity: 1;
}

.trial-banner-close svg {
  width: 18px;
  height: 18px;
}

.trial-banner-microcopy {
  font-size: 0.8125rem;
  opacity: 0.85;
  font-style: italic;
}

/* Mobile adjustments for banner */
@media (max-width: 768px) {
  .trial-banner {
    padding: 0.625rem 0.75rem;
  }

  .trial-banner-content {
    gap: 0.5rem;
  }

  .trial-banner-text {
    font-size: 0.8125rem;
    flex: 1 1 100%;
    order: 1;
  }

  .trial-banner-icon {
    order: 0;
  }

  .trial-banner-btn {
    order: 2;
    padding: 0.375rem 1rem;
    font-size: 0.8125rem;
  }

  .trial-banner-close {
    order: 3;
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
  }

  .trial-banner-microcopy {
    display: none;
  }
}

/* --------------------------------
   Hero Trial CTA
   -------------------------------- */
.trial-cta-hero {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.trial-cta-divider {
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.trial-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 2px solid var(--color-primary);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  background: transparent;
}

.trial-cta-link:hover {
  background: var(--color-primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.trial-cta-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --------------------------------
   Product Card Actions & Trial Badge
   -------------------------------- */
.product-card-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: var(--spacing-md);
  flex-wrap: wrap;
}

/* Ensure buttons in actions have consistent sizing */
.product-card-actions .btn {
  margin: 0;
}

.trial-badge-card {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.625rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  border: 2px solid var(--color-primary);
  background: transparent;
}

.trial-badge-card:hover {
  background: var(--color-primary);
  color: #1a1a2e;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.25);
}

.trial-badge-card svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* --------------------------------
   Checkout Trial Option
   -------------------------------- */
.trial-checkout-option {
  margin-bottom: 2rem;
}

.trial-checkout-box {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}

.trial-checkout-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.trial-checkout-header svg {
  width: 20px;
  height: 20px;
}

.trial-checkout-box p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.trial-checkout-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.trial-checkout-link:hover {
  text-decoration: underline;
  opacity: 0.9;
}

.trial-checkout-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.trial-checkout-link:hover::after {
  transform: translateX(3px);
}

/* --------------------------------
   Dark mode adjustments
   -------------------------------- */
@media (prefers-color-scheme: dark) {
  .trial-cta-link {
    color: #00D4FF;
    border-color: #00D4FF;
  }

  .trial-cta-link:hover {
    background: #00D4FF;
    color: #1a1a2e;
  }
}

/* --------------------------------
   Animations
   -------------------------------- */
.trial-cta-hero,
.trial-badge-card,
.trial-checkout-option {
  animation: trialFadeIn 0.5s ease-out;
}

@keyframes trialFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
