/*!
 * VIP Pricing Page Optimization
 * Conversion-Optimized Design inspired by Dropbox, iCloud, Notion
 * Focus: Clear hierarchy, compelling CTAs, trust signals
 */

/* ========================================
   1. Pricing Container & Layout
   ======================================== */

/* Period tabs - make them more prominent */
.price-period-tabs {
  width: 100%;
  margin-bottom: 2.5rem;
  display: flex;
  justify-content: center;
}

.price-period-tabs .nav-tabs {
  border-bottom: none;
  background: #ffffff;
  padding: 0.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  display: inline-flex;
  gap: 0.5rem;
}

.price-period-tabs .nav-item {
  margin: 0;
}

.price-period-tabs .nav-link {
  border: none;
  border-radius: 8px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: #6b7280;
  background: transparent;
  transition: all 0.2s ease;
  position: relative;
  white-space: nowrap;
}

.price-period-tabs .nav-link:hover {
  background: #f3f4f6;
  color: #111827;
}

.price-period-tabs .nav-link.active {
  background: #0066ff;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.price-period-tabs .badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-weight: 700;
  border-radius: 4px;
}

/* ========================================
   2. Pricing Table Layout - Horizontal Scroll
   ======================================== */

/* Tab-content should not force flex on wrapper */
.tab-content.no-border {
  display: block;
  width: 100%;
  border: none;
}

.tab-pane {
  display: none;
  width: 100%;
}

.tab-pane.active {
  display: block;
}

/* Only the inner row should be flex */
.tab-pane.active > .row {
  display: flex;
  flex-wrap: nowrap;
  gap: 1.5rem;
}

/* Header column - sticky on desktop */
.pricing-span-header {
  flex: 0 0 auto;
  width: 200px;
  min-width: 200px;
}

.pricing-span-header .card.bg-transparent {
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  z-index: 10;
}

.pricing-span-header .card-header.bg-light {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 0.75rem;
}

.pricing-span-header .card-title.text-uppercase.font-weight-bold {
  font-size: 0.9375rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.pricing-span-header .pricing-table-header {
  margin: 0;
  padding: 0;
}

.pricing-span-header .pricing-table-header li {
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  min-height: 46px;
  display: flex;
  align-items: center;
  line-height: 1.4;
}

.pricing-span-header .pricing-table-header li:last-child {
  border-bottom: none;
}

/* Pricing cards container - horizontal scroll */
.pricing-span-body {
  flex: 1;
  overflow-x: auto;
  overflow-y: visible;
  display: flex;
  gap: 1.5rem;
  padding: 1rem 0 0.5rem 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db #f3f4f6;
}

.pricing-span-body::-webkit-scrollbar {
  height: 8px;
}

.pricing-span-body::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.pricing-span-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.pricing-span-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Individual pricing card */
.pricing-span {
  flex: 0 0 auto;
  width: 240px;
  min-width: 240px;
}

/* ========================================
   3. Pricing Card Design - Modern & Clean
   ======================================== */

.pricing-box-small {
  border-radius: 16px;
  border: 2px solid transparent;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  max-height: 600px;
  height: auto;
  display: flex;
  flex-direction: column;
}

.pricing-box-small:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

.pricing-box-small .card-header.p-0 {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border-bottom: 2px solid #e5e7eb;
  padding: 1rem 0.75rem !important;
  text-align: center;
  border-radius: 14px 14px 0 0;
}

.pricing-box-small .card-title.font-weight-bold {
  font-size: 1.0625rem;
  font-weight: 700;
  color: #111827;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.pricing-box-small .card-body.d-flex.flex-column {
  padding: 0.75rem 0.75rem 1rem 0.75rem;
  overflow: hidden;
}

/* Feature list inside pricing cards */
.pricing-table.flex-grow-1 {
  flex: 1;
}

.pricing-table {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-table li {
  padding: 0.625rem 0.5rem;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.875rem;
  color: #374151;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.4;
}

.pricing-table li:last-child {
  border-bottom: none;
}

.pricing-table li i.fa-check.text-success {
  color: #10b981;
  font-size: 1rem;
}

.pricing-table li i.fa-times.text-danger {
  color: #ef4444;
  font-size: 0.875rem;
  opacity: 0.5;
}

/* 向后兼容旧的类名 */
.pricing-table li i.fa-check.green {
  color: #10b981;
}

.pricing-table li i.fa-remove.red,
.pricing-table li i.fa-times.red {
  color: #ef4444;
  opacity: 0.5;
}

.pricing-table li .badge {
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  line-height: 1.3;
}

/* Price display */
.price.mb-3 {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  text-align: center;
  line-height: 1.2;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
  margin: 0.75rem 0;
  text-align: center;
  line-height: 1.2;
}

.price small {
  font-size: 0.75rem;
  font-weight: 400;
  color: #6b7280;
  display: block;
  margin-top: 0.25rem;
}

/* ========================================
   4. Tier-Specific Styling & Hierarchy
   ======================================== */

/* Free tier - minimal emphasis */
.widget-color-grey {
  border-color: #e5e7eb;
  background: #ffffff;
}

.widget-color-grey .card-header {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

/* Standard Member - Blue */
.widget-color-green2 {
  border-color: #10b981;
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.widget-color-green2 .card-header {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.widget-color-green2 .card-title {
  color: #ffffff;
}

.widget-color-green2:hover {
  border-color: #059669;
  box-shadow: 0 12px 24px rgba(16, 185, 129, 0.2);
}

/* Premium Member - Blue (Most Popular) */
.widget-color-blue {
  border-color: #0066ff;
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  position: relative;
}

.widget-color-blue::before {
  content: "推荐";
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #ff6b6b 0%, #ff8787 100%);
  color: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.6875rem;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.05); }
}

.widget-color-blue .card-header {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
}

.widget-color-blue .card-title {
  color: #ffffff;
}

.widget-color-blue:hover {
  border-color: #0052cc;
  box-shadow: 0 12px 24px rgba(0, 102, 255, 0.25);
  transform: translateY(-10px) scale(1.02);
}

/* Super Member - Dark/Premium */
.widget-color-dark {
  border-color: #6b7280;
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
}

.widget-color-dark .card-header {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.widget-color-dark .card-title {
  color: #ffffff;
}

.widget-color-dark:hover {
  border-color: #111827;
  box-shadow: 0 12px 24px rgba(31, 41, 55, 0.2);
}

/* Purple variant for week trial */
.widget-color-purple {
  border-color: #8b5cf6;
  background: linear-gradient(135deg, #ffffff 0%, #faf5ff 100%);
}

.widget-color-purple .card-header {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.widget-color-purple .card-title {
  color: #ffffff;
}

/* ========================================
   5. CTA Buttons - Conversion Optimized
   ======================================== */

.pricing-box-small .btn.btn-lg.mt-auto {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.pricing-box-small .btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
  margin-top: auto;
}

/* 向后兼容 */
.btn-xlg {
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
}

.btn-grey {
  background: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-success2 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-success2:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.3);
  color: #ffffff;
}

.btn-primary {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 102, 255, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0052cc 0%, #0043a6 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 102, 255, 0.3);
  color: #ffffff;
}

.btn-inverse {
  background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.2);
}

.btn-inverse:hover {
  background: linear-gradient(135deg, #111827 0%, #000000 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(31, 41, 55, 0.3);
  color: #ffffff;
}

.btn-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

.btn-purple:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
  color: #ffffff;
}

/* ========================================
   6. Savings Badges & Highlights
   ======================================== */

.badge-yellow {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.6875rem;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.3);
}

.badge-yellow.ml-2 {
  margin-left: 0.5rem;
}

.badge.ml-2 {
  margin-left: 0.5rem;
}

/* Badge colors for different promotions */
.badge-primary {
  background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
  color: #ffffff;
  border: none;
}

.badge-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border: none;
}

.badge-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border: none;
}

.badge-secondary {
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  color: #ffffff;
  border: none;
}

.badge-success2 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
}

/* ========================================
   7. Tooltips & Info Icons
   ======================================== */

[data-rel="tooltip"] {
  position: relative;
  border-bottom: 1px dotted #9ca3af;
  cursor: help;
}

/* ========================================
   8. Responsive Design
   ======================================== */

/* Desktop: Horizontal layout */
@media (min-width: 992px) {
  .tab-pane.active > .row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
  }

  .pricing-span-header {
    position: sticky;
    top: 80px;
  }

  .pricing-span-body {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
  }
}

@media (max-width: 991px) {
  /* Mobile: Stack vertically */
  .tab-pane.active > .row {
    flex-direction: column;
  }

  .pricing-span-header {
    width: 100%;
    margin-bottom: 1.5rem;
  }

  .pricing-span-header .card {
    position: relative;
    top: 0;
  }

  .pricing-span-body {
    flex-direction: column;
    overflow-x: visible;
    gap: 1.5rem;
  }

  .pricing-span {
    width: 100%;
    max-width: 100%;
  }

  .pricing-box-small {
    max-width: 500px;
    margin: 0 auto;
  }
}

@media (max-width: 767px) {
  .price-period-tabs .nav-tabs {
    flex-direction: column;
    width: 100%;
  }

  .price-period-tabs .nav-link {
    width: 100%;
    text-align: center;
  }

  .pricing-span-header .pricing-table-header li {
    font-size: 0.8125rem;
    padding: 0.75rem;
    min-height: 48px;
  }

  .pricing-table li {
    font-size: 0.8125rem;
    padding: 0.75rem 0.25rem;
    min-height: 48px;
  }

  .price {
    font-size: 1.75rem;
  }

  .pricing-box-small .btn {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
  }
}

/* ========================================
   9. Trust Signals & Social Proof
   ======================================== */

.pricing-trust-bar {
  background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
  padding: 1.5rem;
  border-radius: 12px;
  margin: 2rem 0;
  text-align: center;
}

.pricing-trust-bar .trust-items {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.pricing-trust-bar .trust-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #374151;
}

.pricing-trust-bar .trust-icon {
  color: #10b981;
  font-size: 1.25rem;
}

/* ========================================
   10. Comparison Helper Text
   ======================================== */

.pricing-helper-text {
  text-align: center;
  margin: 2rem 0;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  color: #6b7280;
  font-size: 0.875rem;
}

.pricing-helper-text i {
  color: #0066ff;
  margin-right: 0.5rem;
}

.pricing-helper-text a {
  color: #0066ff;
  font-weight: 600;
  text-decoration: none;
}

.pricing-helper-text a:hover {
  text-decoration: underline;
}

/* ========================================
   11. Lifetime Membership Special Styling
   ======================================== */

.pricing-lifetime-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  z-index: 10;
}

/* ========================================
   12. Loading States
   ======================================== */

.pricing-skeleton {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 8px;
  height: 20px;
  margin: 0.5rem 0;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ========================================
   13. Accessibility Enhancements
   ======================================== */

.pricing-box-small:focus-within {
  outline: 3px solid #0066ff;
  outline-offset: 2px;
}

.pricing-box-small .btn:focus {
  outline: 3px solid #0066ff;
  outline-offset: 2px;
}

/* ========================================
   14. Bootstrap 4 Utility Class Enhancements
   ======================================== */

/* Enhanced spacing utilities */
.mb-0 {
  margin-bottom: 0 !important;
}

.mb-3 {
  margin-bottom: 1rem !important;
}

.mt-auto {
  margin-top: auto !important;
}

.p-0 {
  padding: 0 !important;
}

/* Enhanced flex utilities */
.d-flex {
  display: flex !important;
}

.flex-column {
  flex-direction: column !important;
}

.flex-grow-1 {
  flex-grow: 1 !important;
}

/* Enhanced typography utilities */
.text-uppercase {
  text-transform: uppercase !important;
}

.font-weight-bold {
  font-weight: 700 !important;
}

/* Enhanced color utilities */
.text-success {
  color: #10b981 !important;
}

.text-danger {
  color: #ef4444 !important;
}

/* Enhanced background utilities */
.bg-transparent {
  background-color: transparent !important;
}

.bg-light {
  background-color: #f9fafb !important;
}

/* Border utilities */
.border {
  border: 1px solid #e5e7eb !important;
}

.border-bottom {
  border-bottom: 1px solid #e5e7eb !important;
}

/* Tab content no border utility */
.tab-content.no-border {
  border: none !important;
}

/* ========================================
   14.5 Bootstrap 4 Button Enhancements
   ======================================== */

/* Disabled button state */
.btn.disabled,
.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button sizing */
.btn-lg {
  padding: 0.875rem 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  border-radius: 8px;
}

/* Secondary button color */
.btn-secondary {
  background: #6b7280;
  color: #ffffff;
  border: none;
}

.btn-secondary:hover {
  background: #4b5563;
  color: #ffffff;
}

/* ========================================
   15. Print Styles
   ======================================== */

@media print {
  .pricing-span-body {
    display: block;
  }

  .pricing-span {
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  .pricing-box-small {
    box-shadow: none;
    border: 1px solid #000;
  }
}
