/* ═══════════════════════════════════════════════════════════
   SUBSCRIPTION SETTINGS - STYLES (Dark Theme)
   Matches Red Pulse Systems dark theme
   ═══════════════════════════════════════════════════════════ */

/* Collapsible Section Wrapper */
.subscription-section-wrapper {
  margin-bottom: 24px;
}

/* Summary Card (Collapsed State) */
.subscription-summary-card {
  background: var(--bg-card, #1A1A22);
  border: 2px solid var(--border-primary, #333340);
  border-radius: 12px;
  padding: 20px 24px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.subscription-summary-card:hover {
  border-color: var(--red-500, #ef4444);
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.2);
  transform: translateY(-2px);
}

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

.summary-icon {
  font-size: 32px;
}

.summary-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #F5F5F7);
}

.summary-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary, #D4D4DE);
}

.summary-arrow {
  font-size: 16px;
  color: var(--text-tertiary, #A8A8BC);
  transition: transform 0.2s;
}

/* Expanded Details Container */
.subscription-details-container {
  margin-top: 16px;
  animation: slideDown 0.3s ease;
}

.subscription-details-container.hidden {
  display: none;
}

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

/* Compact Plan Cards (For users with subscription) */
.plans-grid-compact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.plan-card-compact {
  background: var(--bg-card, #1A1A22);
  border: 1px solid var(--border-primary, #333340);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s;
}

.plan-card-compact:hover {
  border-color: var(--red-500, #ef4444);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
  transform: translateY(-2px);
}

.compact-header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-icon {
  font-size: 24px;
}

.compact-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary, #F5F5F7);
}

.compact-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--red-400, #f87171);
}

/* Current Plan Card */
.current-plan-card {
  background: var(--bg-card, #1A1A22);
  border: 2px solid var(--border-primary, #333340);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

.current-plan-card.no-subscription {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: rgba(245, 158, 11, 0.1);
  border-color: #f59e0b;
}

.current-plan-card.no-subscription .card-icon {
  font-size: 48px;
}

.current-plan-card.no-subscription .card-content h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  color: var(--text-primary, #F5F5F7);
}

.current-plan-card.no-subscription .card-content p {
  margin: 0;
  color: var(--text-secondary, #D4D4DE);
}

.current-plan-card.active {
  border-width: 2px;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
  color: white;
  background: linear-gradient(135deg, var(--red-600, #dc2626) 0%, var(--red-700, #b91c1c) 100%);
}

.card-header .card-icon {
  font-size: 48px;
}

.card-header h3 {
  margin: 0 0 4px 0;
  font-size: 24px;
  font-weight: 700;
}

.plan-status {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.3);
  color: #6ee7b7;
}

.status-badge.warning {
  background: rgba(245, 158, 11, 0.3);
  color: #fbbf24;
}

.card-body {
  padding: 24px;
  background: var(--bg-card, #1A1A22);
}

.plan-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-primary, #333340);
}

.plan-detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-label {
  font-size: 11px;
  color: var(--text-muted, #7E7E96);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.detail-value {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #F5F5F7);
}

.plan-actions {
  display: flex;
  gap: 12px;
}

/* Plans Grid */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.plan-card {
  background: var(--bg-card, #1A1A22);
  border: 2px solid var(--border-primary, #333340);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.3);
  border-color: var(--red-500, #ef4444);
}

.plan-card.current-plan {
  border-color: var(--red-500, #ef4444);
  background: var(--bg-card-alt, #212130);
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.15);
}

.plan-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.plan-icon {
  font-size: 36px;
}

.plan-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary, #F5F5F7);
}

.current-badge {
  position: absolute;
  top: -8px;
  right: 0;
  background: var(--red-500, #ef4444);
  color: white;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plan-price {
  margin-bottom: 12px;
}

.price-amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--red-400, #f87171);
}

.price-period {
  font-size: 16px;
  color: var(--text-tertiary, #A8A8BC);
}

.plan-description {
  color: var(--text-secondary, #D4D4DE);
  margin-bottom: 20px;
  min-height: 48px;
  font-size: 14px;
  line-height: 1.6;
}

.plan-features {
  flex-grow: 1;
  margin-bottom: 20px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 14px;
}

.feature-check {
  color: #10b981;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-text {
  color: var(--text-secondary, #D4D4DE);
  line-height: 1.4;
}

/* Comparison Table */
.comparison-table-container {
  background: var(--bg-card, #1A1A22);
  border: 1px solid var(--border-primary, #333340);
  border-radius: 12px;
  overflow: hidden;
}

.feature-comparison-table {
  width: 100%;
  border-collapse: collapse;
}

.feature-comparison-table thead th {
  background: var(--bg-secondary, #111116);
  padding: 16px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-primary, #333340);
  font-size: 14px;
  color: var(--text-primary, #F5F5F7);
}

.feature-comparison-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-primary, #333340);
  font-size: 14px;
  color: var(--text-secondary, #D4D4DE);
}

.feature-comparison-table tbody tr:hover {
  background: var(--bg-secondary, #111116);
}

.feature-comparison-table .category-row td {
  background: var(--bg-secondary, #111116);
  font-weight: 600;
  color: var(--text-primary, #F5F5F7);
  padding: 12px 16px;
}

.feature-comparison-table .has-feature {
  color: #10b981;
  font-weight: 700;
  text-align: center;
  font-size: 18px;
}

.feature-comparison-table .no-feature {
  color: var(--text-muted, #7E7E96);
  text-align: center;
  font-size: 18px;
}

/* Settings Section */
.settings-section {
  margin-bottom: 40px;
}

.section-header {
  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0 0 4px 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary, #F5F5F7);
}

.section-header h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary, #F5F5F7);
}

.section-description {
  margin: 0;
  color: var(--text-secondary, #D4D4DE);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
  
  .plan-details {
    grid-template-columns: 1fr;
  }
  
  .feature-comparison-table {
    font-size: 12px;
  }
  
  .feature-comparison-table thead th,
  .feature-comparison-table tbody td {
    padding: 8px;
  }
}