/* StretchStrong - Subscription & Pricing Styles */
/* Primary: #2563eb, Accent: #10b981, Font: Inter */

/* ============================================
   Pricing Modal Overlay
   ============================================ */
.pricing-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  opacity: 0;
  animation: fadeIn 0.25s ease forwards;
}

.pricing-modal-overlay:not(.active) {
  opacity: 0;
  pointer-events: none;
}

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

.pricing-modal-content {
  background: #fff;
  border-radius: 16px;
  max-width: 1000px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
  animation: slideUp 0.3s ease;
}

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

.pricing-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 32px 32px 16px;
  border-bottom: 1px solid #e5e7eb;
}

.pricing-modal-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 4px;
}

.pricing-modal-header p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.pricing-close-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: #9ca3af;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.2s;
}

.pricing-close-btn:hover {
  background: #f3f4f6;
  color: #374151;
}

/* ============================================
   Pricing Grid
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 24px 32px;
}

.pricing-card {
  background: #fff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px 20px;
  position: relative;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.pricing-card:hover {
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
  transform: translateY(-2px);
}

.pricing-card.popular {
  border-color: #2563eb;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.15);
}

.pricing-card.current-plan {
  border-color: #10b981;
  background: #f0fdf4;
}

/* Badges */
.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

.current-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #10b981;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
}

/* Card Header */
.pricing-card-header {
  text-align: center;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 16px;
}

.pricing-card-header h3 {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px;
}

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

.price-amount {
  font-family: 'Inter', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #1a1a2e;
}

.price-note {
  font-size: 14px;
  color: #6b7280;
  font-weight: 400;
}

/* Feature List */
.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  flex: 1;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  color: #374151;
}

.pricing-features li.included i {
  color: #10b981;
  font-size: 12px;
  width: 16px;
  text-align: center;
}

.pricing-features li.excluded {
  color: #9ca3af;
}

.pricing-features li.excluded i {
  color: #d1d5db;
  font-size: 12px;
  width: 16px;
  text-align: center;
}

/* Card Action */
.pricing-card-action {
  margin-top: auto;
}

.pricing-btn {
  width: 100%;
  padding: 10px 16px;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.pricing-btn.upgrade {
  background: #2563eb;
  color: #fff;
}

.pricing-btn.upgrade:hover {
  background: #1d4ed8;
}

.pricing-btn.downgrade {
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
}

.pricing-btn.downgrade:hover {
  background: #e5e7eb;
}

.pricing-btn.current {
  background: #f0fdf4;
  color: #10b981;
  border: 1px solid #10b981;
  cursor: default;
}

/* Footer */
.pricing-footer {
  text-align: center;
  padding: 16px 32px 24px;
  border-top: 1px solid #e5e7eb;
}

.pricing-footer p {
  font-size: 13px;
  color: #9ca3af;
  margin: 0 0 12px;
}

.pricing-manage-btn {
  font-size: 13px;
}

/* ============================================
   Plan Badges (for dashboard)
   ============================================ */
.plan-badge {
  display: inline-block;
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 8px;
  border-radius: 10px;
  vertical-align: middle;
  margin-left: 6px;
}

.plan-badge-free {
  background: #f3f4f6;
  color: #6b7280;
}

.plan-badge-premium {
  background: #dbeafe;
  color: #2563eb;
}

.plan-badge-pro {
  background: #fef3c7;
  color: #d97706;
}

.plan-badge-team {
  background: #ede9fe;
  color: #7c3aed;
}

/* ============================================
   Upgrade Prompt Banner
   ============================================ */
.upgrade-prompt {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}

.upgrade-prompt-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.upgrade-prompt-icon {
  font-size: 28px;
  color: #fbbf24;
  flex-shrink: 0;
}

.upgrade-prompt-text {
  flex: 1;
  color: #fff;
}

.upgrade-prompt-text strong {
  display: block;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.upgrade-prompt-text p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}

.upgrade-prompt-btn {
  background: #fff !important;
  color: #2563eb !important;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.upgrade-prompt-btn:hover {
  background: #f3f4f6 !important;
}

/* ============================================
   Locked Overlay (for gated content)
   ============================================ */
.locked-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: inherit;
  z-index: 10;
}

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

.locked-icon {
  font-size: 24px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.locked-content p {
  font-size: 12px;
  color: #6b7280;
  margin: 0 0 8px;
  font-weight: 500;
}

.locked-content .btn-sm {
  padding: 4px 12px;
  font-size: 12px;
}

/* Protocol card locked state */
.protocol-card.locked {
  position: relative;
  opacity: 0.85;
}

.protocol-card.locked .protocol-content {
  filter: blur(1px);
  pointer-events: none;
}

.protocol-card.locked .protocol-actions {
  filter: blur(1px);
  pointer-events: none;
}

/* ============================================
   Feature gate badges on protocol cards
   ============================================ */
.protocol-lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 5;
}

.protocol-lock-badge i {
  font-size: 10px;
}

/* ============================================
   New Pricing Layout (Feature list + Intervals)
   ============================================ */
.pricing-features-list {
  padding: 24px 32px 16px;
}

.pricing-features-list h3 {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px;
}

.pricing-features-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pricing-features-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  color: #374151;
}

.pricing-features-list li i {
  color: #10b981;
  font-size: 13px;
  width: 18px;
  text-align: center;
}

.pricing-features-list.current {
  text-align: center;
}

.current-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  color: #d97706;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 24px;
  margin-bottom: 16px;
}

.current-plan-badge i {
  font-size: 18px;
}

.pricing-intervals {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 32px 24px;
}

.pricing-interval-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  font-family: 'Inter', sans-serif;
}

.pricing-interval-btn:hover {
  border-color: #2563eb;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.pricing-interval-btn.popular {
  border-color: #2563eb;
  background: #eff6ff;
}

.interval-badge {
  position: absolute;
  top: -10px;
  background: #2563eb;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.interval-label {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.interval-price {
  font-size: 24px;
  font-weight: 800;
  color: #1a1a2e;
}

.interval-price small {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
}

.interval-savings {
  font-size: 11px;
  font-weight: 600;
  color: #10b981;
  background: #f0fdf4;
  padding: 2px 8px;
  border-radius: 8px;
}

/* ============================================
   Responsive - Tablets
   ============================================ */
@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
  }

  .pricing-modal-header {
    padding: 24px 20px 12px;
  }

  .pricing-footer {
    padding: 12px 20px 20px;
  }

  .upgrade-prompt-content {
    flex-wrap: wrap;
  }

  .upgrade-prompt-btn {
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   Responsive - Mobile
   ============================================ */
@media (max-width: 600px) {
  .pricing-modal-overlay {
    padding: 10px;
    align-items: flex-end;
  }

  .pricing-modal-content {
    max-height: 95vh;
    border-radius: 16px 16px 0 0;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  .pricing-intervals {
    grid-template-columns: 1fr;
    padding: 0 16px 20px;
  }

  .pricing-features-list {
    padding: 20px 16px 12px;
  }

  .pricing-card {
    padding: 20px 16px;
  }

  .price-amount {
    font-size: 28px;
  }

  .interval-price {
    font-size: 20px;
  }

  .pricing-modal-header h2 {
    font-size: 20px;
  }

  .upgrade-prompt-content {
    flex-direction: column;
    text-align: center;
  }

  .upgrade-prompt-icon {
    font-size: 32px;
  }
}
