/* Base Variables - Inherited from portal theme */
:root {
  --primary: #4361ee;
  --primary-light: #eff6ff;
  --primary-dark: #3730a3;
  --primary-hover: #3c76e0;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --surface-accent: #f8fafc;
  --surface-tooltip: #1f2937;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tooltip: #ffffff;
  --border: #e5e7eb;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 5rem;
  --sidebar-width: 280px;
  --sidebar-collapsed-width: 72px;
  --transition: 0.2s ease;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}

/* Dark theme */
.dark {
  --surface: #1f2937;
  --surface-hover: #374151;
  --surface-accent: #111827;
  --surface-tooltip: #f3f4f6;
  --border: #374151;
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-tooltip: #111827;
  --primary: #4361ee;
  --primary-light: rgba(37, 99, 235, 0.1);
  --primary-hover: #5f7ef0;
  --primary-dark: #3730a3;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--surface-accent);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--transition), color var(--transition);
}

/* Layout */
.upgrade-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-accent);
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
  background: var(--surface-accent);
  transition: margin-left var(--transition);
  flex: 1;
}

.portal-sidebar.collapsed + .main-content {
  margin-left: var(--sidebar-collapsed-width);
}

.upgrade-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Header Section */
.upgrade-header {
  margin-top: 1rem;
  text-align: center;
  margin-bottom: 4rem;
  padding: 4rem 2rem;
  position: relative;
  background: linear-gradient(135deg, rgba(67, 97, 238, 0.08), rgba(55, 48, 163, 0.05));
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.upgrade-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: 24px 24px;
  opacity: 0.4;
  pointer-events: none;
}

.upgrade-header::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  opacity: 0.1;
  border-radius: 50%;
  transform: translate(30%, -30%);
}

.upgrade-title {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  line-height: 1.1;
  position: relative;
  display: inline-block;
}

.upgrade-title span {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.upgrade-subtitle {
  font-size: 1.375rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
  position: relative;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Pricing Cards */
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  height: fit-content;
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: scale(1.01);
}

.featured-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 0.375rem 1rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  box-shadow: var(--shadow-sm);
}

.featured-badge svg {
  width: 14px;
  height: 14px;
}

/* Pricing Header */
.pricing-header {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.tier-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.tier-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.price-period {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.tier-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Features List */
.pricing-features {
  flex: 1;
  margin-bottom: 1.25rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .feature-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-item:last-child {
  border-bottom: none;
}

.feature-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item.included .feature-icon {
  color: var(--success);
}

.feature-item.excluded .feature-icon {
  color: var(--text-secondary);
}

.feature-item.highlight .feature-icon {
  color: var(--primary);
}

.feature-item span {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
}

.feature-item.excluded span {
  color: var(--text-secondary);
}

.feature-item.highlight span {
  color: var(--text-primary);
  font-weight: 600;
}

/* Pricing Buttons */
.pricing-button {
  width: 100%;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  margin-top: auto;
}

.pricing-button svg {
  width: 16px;
  height: 16px;
}

.upgrade-button {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  box-shadow: var(--shadow-sm);
}

.upgrade-button:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%);
  box-shadow: var(--shadow-md);
}

.current-plan {
  background: var(--surface-hover);
  color: var(--text-secondary);
  cursor: not-allowed;
  border: 2px solid var(--border);
}

/* Benefits Section */
.benefits-section {
  margin-bottom: 3rem;
}

.benefits-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  transition: all var(--transition);
}

.benefit-card:hover {
  box-shadow: var(--shadow-md);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* Benefit Icon Colors */
.benefit-card:nth-child(1) .benefit-icon { 
  background: #4361ee;
}

.benefit-card:nth-child(2) .benefit-icon { 
  background: #8b5cf6;
}

.benefit-card:nth-child(3) .benefit-icon { 
  background: #e76f51;
}

.benefit-card:nth-child(4) .benefit-icon { 
  background: #d97706;
}

.benefit-card:nth-child(5) .benefit-icon { 
  background: #3b82f6;
}

.benefit-card:nth-child(6) .benefit-icon { 
  background: #f97316;
}

/* Dark theme adjustments - no need to change icon colors since they're already light */
.dark .benefit-icon {
  color: rgba(255, 255, 255, 0.95);
}

.benefit-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.benefit-description {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

/* FAQ Section */
.faq-section {
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.faq-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.faq-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  user-select: none;
  transition: all var(--transition);
}

.faq-question:hover {
  background: var(--surface-hover);
}

.faq-question svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform var(--transition);
  color: var(--text-secondary);
}

.faq-item.active .faq-question {
  background: var(--primary-light);
  color: var(--primary);
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all var(--transition);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0 1.25rem;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  padding: 0 1.25rem 1.25rem;
  opacity: 1;
  margin-top: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    padding: 1rem;
    padding-top: 80px; /* Space for mobile header */
  }

  .portal-sidebar.collapsed + .main-content {
    margin-left: 0;
  }

  /* Hide sidebar collapse button on mobile */
  .portal-sidebar-footer {
    display: none !important;
  }

  .upgrade-header {
    padding: 3rem 1rem;
    margin-bottom: 3rem;
  }

  .upgrade-title {
    font-size: 2.5rem;
  }

  .upgrade-subtitle {
    font-size: 1.125rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pricing-card {
    padding: 1.5rem;
  }

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

  .price {
    font-size: 2.5rem;
  }

  .benefits-title,
  .faq-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .benefits-grid,
  .faq-grid {
    gap: 1rem;
  }

  .benefit-card {
    padding: 1rem;
  }

  .benefit-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 0.75rem;
  }

  .benefit-icon svg {
    width: 20px;
    height: 20px;
  }

  .benefit-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .faq-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 0.9375rem;
  }

  .faq-question svg {
    width: 18px;
    height: 18px;
  }

  .faq-answer {
    padding: 0 1rem;
  }

  .faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
  }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-content {
    margin-left: 0;
    padding: 1.5rem;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }

  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .faq-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
  }
}

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

.upgrade-header,
.pricing-grid,
.benefits-section,
.faq-section {
  animation: fadeInUp 0.6s ease forwards;
}

.pricing-grid {
  animation-delay: 0.1s;
}

.benefits-section {
  animation-delay: 0.2s;
}

.faq-section {
  animation-delay: 0.3s;
}

/* Sponsored Card Styles */
.sponsored-card {
  background: linear-gradient(to bottom, rgba(67, 97, 238, 0.05), transparent);
}

.sponsored-card .featured-badge {
  background: var(--primary);
  color: white;
}

#sponsoredBtn {
  text-decoration: none;
}

.sponsored-card .pricing-header {
  border-bottom-color: rgba(67, 97, 238, 0.2);
}

.sponsored-card .feature-item.highlight .feature-icon {
  color: var(--primary);
}

.sponsored-card .upgrade-button {
  background: var(--primary);
  color: white;
}

.sponsored-card .upgrade-button:hover {
  background: var(--primary-hover);
} 