/* Subscription & Upgrade Modal Styles */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: var(--navy-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  max-width: 700px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
}

.modal-close {
  background: none;
  border: none;
  color: var(--gray);
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.modal-body {
  padding: 32px;
}

.modal-body > p {
  font-size: 1rem;
  color: var(--gray);
  margin-bottom: 24px;
  line-height: 1.6;
}

.usage-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  margin: 16px 0 8px;
}

.usage-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-glow));
  border-radius: 4px;
  transition: width 0.3s;
}

.usage-text {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 24px !important;
}

.tier-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.tier-card {
  background: var(--navy-mid);
  border: 2px solid transparent;
  border-radius: 12px;
  padding: 24px;
  position: relative;
  transition: all 0.2s;
}

.tier-card:hover {
  border-color: var(--accent);
}

.tier-card.recommended {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.popular-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--success);
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tier-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 8px;
}

.tier-price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-glow);
  margin-bottom: 16px;
}

.tier-price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--gray);
}

.tier-features {
  list-style: none;
  margin-bottom: 20px;
}

.tier-features li {
  font-size: 0.875rem;
  color: var(--gray);
  padding: 6px 0;
}

.btn-upgrade {
  width: 100%;
  padding: 12px 24px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: var(--accent-glow);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upgrade:hover {
  background: var(--accent);
  color: white;
}

.btn-upgrade.primary {
  background: var(--accent);
  color: white;
}

.btn-upgrade.primary:hover {
  background: var(--accent-hover);
}

.modal-footer-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray);
  margin-top: 16px !important;
}

.modal-footer-text a {
  color: var(--accent-glow);
  text-decoration: none;
}

.modal-footer-text a:hover {
  text-decoration: underline;
}

.modal-content.payment-pending {
  text-align: center;
}

.modal-content.payment-pending .modal-body {
  padding: 48px 32px;
}

.btn-primary {
  padding: 12px 32px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  padding: 12px 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--gray);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin: 8px;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
}

/* Pending Upgrade Banner */
.pending-upgrade-banner {
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-glow));
  z-index: 999;
  padding: 16px 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.banner-content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.banner-content p {
  color: white;
  font-weight: 600;
  margin: 0;
}

.btn-sm {
  padding: 8px 16px;
  background: white;
  border: none;
  border-radius: 6px;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-sm:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-sm.secondary {
  background: transparent;
  border: 1px solid white;
  color: white;
}

.btn-sm.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* Tier Badge */
.tier-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .tier-cards {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-height: 80vh;
  }

  .modal-body {
    padding: 24px 20px;
  }

  .pending-upgrade-banner .banner-content {
    flex-direction: column;
    gap: 12px;
  }
}
