/**
 * Premium Plan Page - Dark Professional Design
 * Matching the settings subscription tab aesthetic
 */

/* ===== Page Container ===== */
.plan-page-container {
  min-height: 100vh;
  padding: 24px 16px 40px;
  max-width: 800px;
  margin: 0 auto;
}

/* ===== Hero Section ===== */
.plan-hero {
  text-align: center;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.plan-hero-content {
  max-width: 600px;
  margin: 0 auto;
}

.hero-icon-wrapper {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #6E20F4 50%, #A855F7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 32px rgba(110, 32, 244, 0.4);
}

.hero-icon-wrapper i {
  font-size: 32px;
  color: white;
}

.plan-hero-title {
  font-size: 26px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.plan-hero-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 auto 24px;
  max-width: 400px;
  line-height: 1.6;
}

/* ===== Countdown Banner ===== */
.countdown-banner {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(110, 32, 244, 0.2) 100%);
  border: 1px solid rgba(139, 92, 246, 0.4);
  border-radius: 50px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

.countdown-banner i {
  font-size: 18px;
  color: #A78BFA;
}

.countdown-timer {
  font-weight: 700;
  color: #A78BFA;
  font-size: 15px;
}

/* ===== Features Section ===== */
.plan-features-section {
  margin-bottom: 40px;
}

.features-section-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.features-section-title i {
  color: #A78BFA;
}

.premium-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.premium-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.9));
  border-radius: 14px;
  border: 1px solid rgba(130, 64, 255, 0.2);
  transition: all 0.3s ease;
}

.premium-feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(130, 64, 255, 0.4);
  transform: translateX(4px);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25) 0%, rgba(110, 32, 244, 0.25) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon i {
  font-size: 20px;
  color: #A78BFA;
}

.feature-content {
  flex: 1;
  min-width: 0;
}

.feature-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 4px 0;
}

.feature-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.5;
}

/* ===== Plans Section ===== */
.plans-section {
  margin-bottom: 40px;
}

.plans-section-title {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.plans-section-title i {
  color: #A78BFA;
}

.plan-cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
}

/* ===== Plan Cards - Tier Card Style ===== */
.plan-card {
  flex: 1 1 240px;
  max-width: 360px;
  min-width: 0;
  background: linear-gradient(145deg, rgba(30, 30, 40, 0.95), rgba(20, 20, 30, 0.9));
  border: 1px solid rgba(130, 64, 255, 0.2);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.plan-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #8240FF, #C850C0);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.plan-card:hover {
  border-color: rgba(130, 64, 255, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(130, 64, 255, 0.2);
}

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

/* Popular Plan */
.plan-card.popular {
  border-color: rgba(255, 193, 7, 0.5);
  background: linear-gradient(145deg, rgba(40, 35, 25, 0.95), rgba(30, 25, 20, 0.9));
}

.plan-card.popular::before {
  background: linear-gradient(90deg, #ffc107, #ff9800);
  opacity: 1;
}

/* One-time/Day Pass Plan */
.plan-card.one-time {
  border-color: rgba(13, 202, 240, 0.3);
}

.plan-card.one-time::before {
  background: linear-gradient(90deg, #0dcaf0, #20c997);
}

/* Plan Header */
.plan-card-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 16px;
  text-align: center;
}

.plan-name {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  text-align: center;
}

.plan-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-badge.popular {
  background: linear-gradient(135deg, #ffc107, #ff9800);
  color: #1a1a1a;
}

.plan-badge.one-time {
  background: rgba(13, 202, 240, 0.2);
  color: #0dcaf0;
}

.plan-badge.best-value {
  background: linear-gradient(135deg, #8240FF, #C850C0);
  color: #fff;
}

.plan-badge.flexible {
  background: rgba(32, 201, 151, 0.15);
  color: #20c997;
  border: 1px solid rgba(32, 201, 151, 0.3);
}

/* Plan Price */
.plan-price-container {
  margin-bottom: 16px;
  text-align: center;
}

.plan-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.plan-price .currency {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}

.plan-price .amount {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.plan-price .period {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  margin-left: 4px;
}

.plan-discount {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: rgba(220, 53, 69, 0.15);
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #ff6b6b;
}

.plan-badge {
  display: inline-block;
  margin-top: 8px;
}

/* Plan Description */
.plan-description {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.5;
  text-align: center;
}

/* Plan Features List */
.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  display: inline-block;
  text-align: left;
  width: 100%;
}

.plan-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.plan-features-list li i {
  color: #8240FF;
  font-size: 1rem;
  flex-shrink: 0;
}

.plan-card.one-time .plan-features-list li i {
  color: #0dcaf0;
}

/* Plan CTA Button */
.plan-cta-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #8B5CF6 0%, #6E20F4 50%, #7C3AED 100%);
  border: none;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(110, 32, 244, 0.35);
}

.plan-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(110, 32, 244, 0.45);
  background: linear-gradient(135deg, #9061F9 0%, #7C3AED 50%, #8B5CF6 100%);
}

.plan-cta-btn:active {
  transform: translateY(0);
}

.plan-cta-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.plan-cta-btn i {
  font-size: 18px;
}

.plan-card.popular .plan-cta-btn {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #1a1a1a;
  box-shadow: 0 4px 16px rgba(255, 193, 7, 0.35);
}

.plan-card.popular .plan-cta-btn:hover {
  box-shadow: 0 8px 24px rgba(255, 193, 7, 0.45);
}

.plan-card.one-time .plan-cta-btn {
  background: linear-gradient(135deg, #0dcaf0 0%, #20c997 100%);
  box-shadow: 0 4px 16px rgba(13, 202, 240, 0.35);
}

.plan-card.one-time .plan-cta-btn:hover {
  box-shadow: 0 8px 24px rgba(13, 202, 240, 0.45);
}

/* ===== Trust Section ===== */
.trust-section {
  padding: 24px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-content {
  text-align: center;
}

.trust-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.trust-title i {
  color: #A78BFA;
}

.stripe-link {
  display: inline-block;
  margin-bottom: 16px;
}

.stripe-logo {
  height: 32px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.stripe-logo:hover {
  opacity: 1;
}

.payment-methods {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.payment-methods img {
  height: 24px;
  width: auto;
  opacity: 0.7;
  transition: all 0.3s ease;
  filter: grayscale(30%);
}

.payment-methods img:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: grayscale(0%);
}

/* ===== Responsive Design ===== */
@media (min-width: 600px) {
  .plan-page-container {
    padding: 32px 24px 48px;
  }
  
  .hero-icon-wrapper {
    width: 80px;
    height: 80px;
  }
  
  .hero-icon-wrapper i {
    font-size: 36px;
  }
  
  .plan-hero-title {
    font-size: 32px;
  }
  
  .premium-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .plan-cards-grid {
    gap: 20px;
  }
}

@media (min-width: 900px) {
  .plan-page-container {
    max-width: 1000px;
    padding: 40px 32px 56px;
  }
  
  .plan-hero-title {
    font-size: 36px;
  }
  
  .premium-features-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .plan-cards-grid {
    gap: 24px;
  }
}

/* ===== Animation ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plan-card {
  animation: fadeInUp 0.4s ease forwards;
}

.plan-card:nth-child(1) { animation-delay: 0s; }
.plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card:nth-child(3) { animation-delay: 0.2s; }
.plan-card:nth-child(4) { animation-delay: 0.3s; }
.plan-card:nth-child(5) { animation-delay: 0.4s; }

.premium-feature-item {
  animation: fadeInUp 0.4s ease forwards;
}

.premium-feature-item:nth-child(1) { animation-delay: 0s; }
.premium-feature-item:nth-child(2) { animation-delay: 0.05s; }
.premium-feature-item:nth-child(3) { animation-delay: 0.1s; }
.premium-feature-item:nth-child(4) { animation-delay: 0.15s; }
.premium-feature-item:nth-child(5) { animation-delay: 0.2s; }
.premium-feature-item:nth-child(6) { animation-delay: 0.25s; }

/* ===== Loading State ===== */
.plan-cards-grid .spinner-border {
  width: 2.5rem;
  height: 2.5rem;
  color: #8240FF !important;
}

/* ===== Accessibility ===== */
.plan-card:focus,
.plan-cta-btn:focus {
  outline: 3px solid #8240FF;
  outline-offset: 3px;
}

/* ===== Modal Context Overrides ===== */
#planUpgradeModal .modal-dialog {
  max-width: 520px;
  margin: 1.75rem auto;
}

#planUpgradeModal .modal-content {
  background: #14141e;
  border: 1px solid rgba(130, 64, 255, 0.2);
  border-radius: 20px;
  overflow: hidden;
  max-height: 90vh;
}

#planUpgradeModal .modal-header {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(110, 32, 244, 0.1));
  border-bottom: 1px solid rgba(130, 64, 255, 0.2);
  padding: 14px 20px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

#planUpgradeModal .modal-title {
  color: #A78BFA;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.5px;
}

#planUpgradeModal .btn-close {
  filter: invert(1);
  opacity: 0.6;
  margin: 0;
  padding: 0;
}

#planUpgradeModal .btn-close:hover {
  opacity: 1;
}

#planUpgradeModal .modal-body {
  background: #14141e;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#planUpgradeModal .plan-page-container {
  min-height: auto;
  padding: 20px 16px 24px;
  max-width: 100%;
}

#planUpgradeModal .plan-hero {
  margin-bottom: 20px;
  padding-bottom: 16px;
}

#planUpgradeModal .hero-icon-wrapper {
  width: 56px;
  height: 56px;
  margin-bottom: 14px;
}

#planUpgradeModal .hero-icon-wrapper i {
  font-size: 26px;
}

#planUpgradeModal .plan-hero-title {
  font-size: 22px;
  margin-bottom: 8px;
}

#planUpgradeModal .plan-hero-subtitle {
  font-size: 13px;
  margin-bottom: 16px;
}

#planUpgradeModal .countdown-banner {
  padding: 8px 16px;
  font-size: 12px;
}

#planUpgradeModal .features-section-title,
#planUpgradeModal .plans-section-title {
  font-size: 15px;
  margin-bottom: 14px;
}

#planUpgradeModal .premium-features-grid {
  grid-template-columns: 1fr;
  gap: 8px;
}

#planUpgradeModal .premium-feature-item {
  padding: 12px;
  gap: 10px;
}

#planUpgradeModal .feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

#planUpgradeModal .feature-icon i {
  font-size: 16px;
}

#planUpgradeModal .feature-title {
  font-size: 13px;
}

#planUpgradeModal .feature-desc {
  font-size: 12px;
}

#planUpgradeModal .plan-features-section {
  margin-bottom: 24px;
}

#planUpgradeModal .plan-cards-grid {
  grid-template-columns: 1fr;
  gap: 12px;
}

#planUpgradeModal .plan-card {
  padding: 18px;
  border-radius: 14px;
}

#planUpgradeModal .plan-name {
  font-size: 1.15rem;
}

#planUpgradeModal .plan-price .amount {
  font-size: 2.2rem;
}

#planUpgradeModal .plan-cta-btn {
  padding: 12px 20px;
  font-size: 14px;
  border-radius: 10px;
}

#planUpgradeModal .trust-section {
  padding: 16px 0;
}

#planUpgradeModal .trust-title {
  font-size: 12px;
}

#planUpgradeModal .stripe-logo {
  height: 26px;
}

#planUpgradeModal .payment-methods img {
  height: 20px;
}

@media (min-width: 600px) {
  #planUpgradeModal .modal-dialog {
    max-width: 560px;
  }

  #planUpgradeModal .premium-features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════
   Free Trial Banner
   ═══════════════════════════════════════════════════════════ */

.plan-trial-banner {
    background: linear-gradient(135deg, rgba(181, 138, 254, 0.15) 0%, rgba(108, 92, 231, 0.2) 100%);
    border: 1px solid rgba(181, 138, 254, 0.3);
    border-radius: 16px;
    margin: 0 auto 32px;
    max-width: 700px;
    padding: 24px 28px;
    animation: trialPulse 3s ease-in-out infinite;
}

@keyframes trialPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(181, 138, 254, 0); }
    50% { box-shadow: 0 0 20px 4px rgba(181, 138, 254, 0.15); }
}

.trial-banner-content {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.trial-banner-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(181, 138, 254, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #b58afe;
    flex-shrink: 0;
}

.trial-banner-text {
    flex: 1;
    min-width: 200px;
}

.trial-banner-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 4px;
}

.trial-banner-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

.trial-banner-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #b58afe 0%, #6c5ce7 100%);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.trial-banner-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(181, 138, 254, 0.4);
}

.trial-banner-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .trial-banner-content {
        flex-direction: column;
        text-align: center;
    }
    .trial-banner-btn {
        width: 100%;
    }
}
