/* ============================================
   PRO MODE - Dark Premium Theme Overrides
   Handles hardcoded colors that don't use CSS vars
   ============================================ */

/* --- Top bar (no image state) --- */
.app.pro-mode:not(.has-image) .top-bar {
  background: rgba(10, 10, 15, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* --- User dropdown --- */
.app.pro-mode .user-dropdown {
  background: #141420;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.app.pro-mode .dropdown-header {
  background: rgba(255, 255, 255, 0.04);
}

.app.pro-mode .dropdown-section {
  background: #141420;
}

.app.pro-mode .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.app.pro-mode .dropdown-credits {
  background: rgba(255, 255, 255, 0.04);
}

/* --- Quality toggle indicator --- */
.app.pro-mode .toggle-indicator {
  background: #1e1e2a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* --- Quality help tooltip --- */
.app.pro-mode .quality-help-tooltip {
  background: #141420;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* --- Empty state / upload card --- */
.app.pro-mode .empty-state {
  background: rgba(139, 124, 246, 0.08) !important;
  border-color: rgba(139, 124, 246, 0.3) !important;
}

/* --- Floating buttons on image --- */
.app.pro-mode .clear-marker-btn {
  background: rgba(10, 10, 15, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

.app.pro-mode .clear-marker-btn:hover {
  background: rgba(10, 10, 15, 0.95);
}

.app.pro-mode .change-photo-btn {
  background: rgba(10, 10, 15, 0.85);
  border-color: rgba(255, 255, 255, 0.1);
}

.app.pro-mode .change-photo-btn:hover {
  background: rgba(10, 10, 15, 0.95);
}

/* --- Loading overlay --- */
.app.pro-mode .loading-overlay {
  background: rgba(10, 10, 15, 0.92);
}

.app.pro-mode .loading-card {
  background: #141420;
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.06);
}

/* --- Credit badge states --- */
.app.pro-mode .credit-badge.critical {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.app.pro-mode .credit-badge.zero {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
}

.app.pro-mode .credit-badge.low {
  color: #fbbf24;
}

.app.pro-mode .credit-badge.has-gift {
  background: rgba(16, 185, 129, 0.12);
  border-color: #10b981;
  color: #34d399;
}

/* --- Conversion save badge --- */
.app.pro-mode .conversion-save-badge {
  background: rgba(20, 20, 32, 0.95);
  color: var(--text);
}

/* --- Soft upsell banner --- */
.app.pro-mode .soft-upsell-banner {
  background: linear-gradient(135deg, rgba(139, 124, 246, 0.12) 0%, rgba(124, 58, 237, 0.18) 100%);
  border-color: rgba(139, 124, 246, 0.25);
}

/* --- Ambient glow on image area --- */
.app.pro-mode .image-area {
  position: relative;
}

.app.pro-mode .image-area::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(139, 124, 246, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* --- Post-edit floating buttons (Save, Share, etc.) --- */
.app.pro-mode .post-edit-btn {
  background: rgba(10, 10, 15, 0.85);
  color: var(--text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.app.pro-mode .post-edit-btn:hover {
  background: rgba(10, 10, 15, 0.95);
}

/* --- Compare slider: keep white for contrast --- */
/* .compare-slider-handle, arrows stay white — they sit on dark images */

/* --- Homepage sections with hardcoded light backgrounds --- */
html.pro-mode-hint .proof-band {
  background: linear-gradient(180deg, var(--bg) 0%, #0e0e18 100%);
}

html.pro-mode-hint .capability--alt {
  background: #111118;
}

/* --- Homepage prompt chips & equation --- */
.app.pro-mode .prompt-chip,
html.pro-mode-hint .prompt-chip {
  background: #1e1e2a;
}

.app.pro-mode .eq-item,
html.pro-mode-hint .eq-item {
  background: #1e1e2a;
}

/* --- Pricing section (visible when scrolling) --- */
.app.pro-mode .pricing-v9,
html.pro-mode-hint .pricing-v9 {
  background: linear-gradient(180deg, #0e0e18 0%, #0a0a0f 100%);
}

.app.pro-mode .pricing-v9-card,
html.pro-mode-hint .pricing-v9-card {
  background: #141420;
}

.app.pro-mode .pricing-v9-card--hero,
html.pro-mode-hint .pricing-v9-card--hero {
  background: linear-gradient(180deg, #1a1a28 0%, #141420 100%);
}

.app.pro-mode .pricing-v9-free,
html.pro-mode-hint .pricing-v9-free {
  background: #1e1e2a;
}

.app.pro-mode .pricing-v9-billing-option--active,
html.pro-mode-hint .pricing-v9-billing-option--active {
  background: #1e1e2a;
}

/* --- Legacy pricing cards --- */
.app.pro-mode .pricing-card,
html.pro-mode-hint .pricing-card {
  background: #141420;
}

.app.pro-mode .pricing-card-popular,
html.pro-mode-hint .pricing-card-popular {
  background: linear-gradient(180deg, rgba(139, 124, 246, 0.08) 0%, #141420 100%);
}

/* --- Subscription icon --- */
.app.pro-mode .sub-row-icon,
.app.pro-mode .sub-icon,
html.pro-mode-hint .sub-row-icon,
html.pro-mode-hint .sub-icon {
  background: #1e1e2a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* --- Premium reveal animation (triggers after first purchase) --- */
.pro-mode-reveal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%,
    rgba(139, 124, 246, 0.2) 0%,
    rgba(10, 10, 15, 0.65) 55%,
    rgba(10, 10, 15, 0.9) 100%);
  animation: proReveal 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes proReveal {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  55%  { opacity: 1; }
  100% { opacity: 0; }
}

/* Slow down all transitions during the reveal for drama */
.app.pro-mode-revealing,
.app.pro-mode-revealing .top-bar,
.app.pro-mode-revealing .edit-card,
.app.pro-mode-revealing .controls,
.app.pro-mode-revealing .image-area,
.app.pro-mode-revealing .empty-state {
  transition: background-color 0.9s ease, color 0.7s ease, border-color 0.7s ease, box-shadow 0.7s ease !important;
}

/* --- Smooth transitions (only after initial paint) --- */
.app.pro-mode-ready,
.app.pro-mode-ready .top-bar,
.app.pro-mode-ready .edit-card,
.app.pro-mode-ready .controls,
.app.pro-mode-ready .image-area {
  transition: background-color 0.4s ease, color 0.3s ease, border-color 0.3s ease;
}

/* --- FOUC prevention: dark body before app renders --- */
html.pro-mode-hint body {
  background: #0a0a0f;
}
