/* ==========================================================================
   JUST MARKET — Demo Mode CSS (orange/amber themed)
   ========================================================================== */

/* Subtle orange top border for demo pages */
body.app-body.demo-page { border-top: 3px solid #ff8c00; }

/* DEMO MODE banner */
.demo-banner {
  background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 50%, #f59e0b 100%);
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3);
  position: relative;
  overflow: hidden;
  animation: demoBannerPulse 3s ease-in-out infinite;
}

@keyframes demoBannerPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(255, 140, 0, 0.3); }
  50% { box-shadow: 0 4px 28px rgba(255, 140, 0, 0.5); }
}

.demo-banner .demo-banner-icon {
  font-size: 20px;
  animation: demoIconSpin 4s linear infinite;
}

@keyframes demoIconSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.demo-banner .demo-banner-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  align-items: center;
}

.demo-banner .demo-banner-title {
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.demo-banner .demo-banner-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.92;
}

/* Responsive banner */
@media (max-width: 600px) {
  .demo-banner {
    font-size: 12px;
    padding: 10px 12px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .demo-banner .demo-banner-title { font-size: 13px; }
  .demo-banner .demo-banner-sub { font-size: 10px; }
}

/* Demo badge for nav */
.demo-nav-badge {
  display: inline-block;
  background: linear-gradient(135deg, #ff8c00, #f59e0b);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 4px;
  vertical-align: middle;
}

.demo-nav-link {
  color: #ff8c00 !important;
}

/* Demo wallet balance card */
.demo-balance-card {
  background: linear-gradient(135deg, #ff8c00 0%, #f59e0b 100%);
  border-radius: 16px;
  padding: 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.25);
}

.demo-balance-card .label {
  font-size: 14px;
  opacity: 0.9;
}

.demo-balance-card .amount {
  font-size: 32px;
  font-weight: 700;
  font-family: var(--font-mono);
  margin: 8px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.demo-balance-card .amount .eye-toggle {
  cursor: pointer;
  font-size: 18px;
  opacity: 0.7;
}

.demo-balance-card .wallet-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 24px;
  opacity: 0.3;
}

.demo-balance-card .bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 13px;
}

.demo-balance-card .bottom-strip .demo-tag {
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Reset Demo Balance button */
.demo-reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #ff8c00 0%, #e67e00 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 14px rgba(255, 140, 0, 0.3);
  font-family: inherit;
}

.demo-reset-btn:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(255, 140, 0, 0.4);
}

.demo-reset-btn:active {
  transform: scale(0.98);
}

.demo-reset-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.demo-reset-btn i {
  font-size: 14px;
}

/* Back to real dashboard link */
.demo-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 12px;
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  transition: all 0.2s;
  font-weight: 600;
}

.demo-back-link:hover {
  border-color: #ff8c00;
  color: #ff8c00;
  text-decoration: none;
}

/* Demo action row (reset + back) */
.demo-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Demo modal styling */
.demo-modal-title {
  color: #ff8c00;
}

/* Demo status badge overrides */
.demo-status-badge {
  background: rgba(255, 140, 0, 0.15);
  color: #ff8c00;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  font-weight: bold;
  display: inline-block;
}

/* ===== STYLED MODALS (shared with dash.css patterns, orange accent) ===== */
.modal-card {
  background: var(--bg-card, #171d2b);
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 16px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  position: relative;
  animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close-x {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  color: var(--text-dim, #9CA3AF);
  font-size: 22px; cursor: pointer;
  transition: color 0.2s;
}
.modal-close-x:hover { color: var(--text-color, #fff); }
.modal-header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 4px;
}
.modal-header-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: rgba(255, 140, 0, 0.12);
  color: #ff8c00;
}
.modal-title {
  font-size: 16px; font-weight: 700;
  color: var(--text-color, #fff);
  margin: 0;
}
.modal-subtitle {
  font-size: 12px; color: var(--text-dim, #9CA3AF);
  margin: 2px 0 0;
}
.modal-label {
  font-size: 12px; color: var(--text-dim, #9CA3AF);
  display: block; margin-bottom: 6px;
}

/* Segmented quick-amount buttons (orange theme) */
.quick-amounts-group {
  display: flex; gap: 8px; margin-bottom: 12px;
}
.quick-amt-btn {
  flex: 1; padding: 10px 4px;
  border: 1px solid var(--border-color, rgba(255,255,255,0.08));
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim, #9CA3AF);
  font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.quick-amt-btn:hover {
  border-color: #ff8c00;
  color: #ff8c00;
}
.quick-amt-btn.active {
  background: #ff8c00;
  color: #fff;
  border-color: #ff8c00;
}

/* Summary rows */
.modal-summary {
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  padding: 12px 16px;
}
.modal-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.modal-summary-row:last-child { border-bottom: none; }
.modal-summary-row > span:first-child {
  color: var(--text-dim, #9CA3AF);
}
.modal-summary-value {
  color: var(--text-color, #fff);
  font-weight: 500;
}

/* Status badge */
.modal-status-badge {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px; font-weight: 600;
}
.modal-status-running {
  background: rgba(51, 170, 255, 0.15);
  color: var(--info-color, #33aaff);
}

/* Modal buttons */
.modal-btn-cancel {
  padding: 10px 20px; border-radius: 10px;
  font-size: 13px;
}
.modal-btn-confirm {
  padding: 10px 20px; border-radius: 10px;
  font-size: 13px;
}


/* ===== LIGHT MODE OVERRIDES (demo) ===== */
body.light-mode .modal-card {
  background: #ffffff;
  border-color: rgba(0,0,0,0.1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
body.light-mode .modal-close-x { color: #666; }
body.light-mode .modal-title { color: #1a1a1a; }
body.light-mode .modal-subtitle { color: #666; }
body.light-mode .modal-label { color: #666; }
body.light-mode .quick-amt-btn {
  border-color: rgba(0,0,0,0.1);
  color: #666;
}
body.light-mode .quick-amt-btn:hover {
  border-color: #ea580c;
  color: #ea580c;
}
body.light-mode .quick-amt-btn.active {
  background: #ea580c;
  color: #fff;
}
body.light-mode .modal-summary {
  background: rgba(0,0,0,0.03);
}
body.light-mode .modal-summary-row {
  border-bottom-color: rgba(0,0,0,0.05);
}
body.light-mode .modal-summary-row > span:first-child { color: #666; }
body.light-mode .modal-summary-value { color: #1a1a1a; }
body.light-mode .demo-banner {
  background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
  border-color: #fed7aa !important;
}
body.light-mode .demo-banner-text { color: #9a3412 !important; }
body.light-mode .demo-status-badge {
  background: rgba(234, 88, 12, 0.12);
  color: #ea580c;
}
body.light-mode .auto-credited-note {
  color: #16a34a;
}
