/* =============================================================================
   DUEL STYLES - ParlayBuilder
   Covers: dashboard duel cards, duel share modal, duel landing page
   ============================================================================= */

/* =============================================================================
   DUEL ROOT (landing page)
   ============================================================================= */

#duel-root {
  display: none;
  min-height: 100vh;
  background: var(--bg-base, #060e1e);
}

#duel-root:empty {
  display: none;
}

body.duel-active #duel-root {
  display: block !important;
}

body.duel-active .navbar,
body.duel-active .landing-nav,
body.duel-active #cover-page,
body.duel-active .workbench-layout,
body.duel-active .sidebar,
body.duel-active #main-app-wrapper,
body.duel-active .pb-bottom-nav {
  display: none !important;
}

/* =============================================================================
   DASHBOARD DUEL CARDS
   ============================================================================= */

.dashboard-duels {
  margin-top: 20px;
}

.duels-section-header {
  padding: 12px 16px;
}

.duels-section-title {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

.duels-section-title i {
  color: #00D3BD;
  margin-right: 6px;
}

.dashboard-duels-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 8px 12px;
}

.duel-card {
  background: #000000;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 14px 10px;
  transition: border-color 0.2s;
}

.duel-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.duel-card.duel-won,
.duel-card.duel-lost {
  border-color: rgba(255, 255, 255, 0.08);
}

.duel-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}


/* =============================================================================
   DUEL MATCHUP HEADER (block-per-player grid layout)
   ============================================================================= */

.duel-mu-header {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0px 14px;
}

/* Each player block: grid with shield column + info column */
.duel-mu-block {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px 4px;
  grid-template-rows: 1fr auto auto;
}

.duel-mu-block-left {
  grid-template-columns: auto 1fr;
}

.duel-mu-block-right {
  grid-template-columns: 1fr auto;
}

/* Shield column — spans top row + bar row, sits above bar via z-index */
.duel-mu-shield-col {
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  align-self: start;
}

.duel-mu-block-left .duel-mu-shield-col {
  grid-column: 1;
  grid-row: 1;
}

.duel-mu-block-right .duel-mu-shield-col {
  grid-column: 2;
  grid-row: 1;
}

.duel-mu-shield-col .rank-shield-img {
  width: 44px;
  height: auto;
}

.duel-mu-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #009987;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  color: #000;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Top row: pct% WIN + odds */
.duel-mu-top-row {
  display: flex;
  align-items: center;
  gap: 6px;
  grid-row: 1;
  align-self: end;
  margin-top: -4px;
  margin-bottom: 4px;
}

.duel-mu-block-left .duel-mu-top-row {
  grid-column: 2;
  padding-left: 8px;
}

.duel-mu-block-right .duel-mu-top-row {
  grid-column: 1;
  padding-right: 8px;
}

.duel-mu-pct {
  font-size: 13px;
  font-weight: 700;
  color: #009987;
  white-space: nowrap;
}

.duel-mu-pct.duel-mu-winner   { color: #2ecc71; }
.duel-mu-pct.duel-mu-loser    { color: #e74c3c; }
.duel-mu-pct.duel-mu-trailing { color: #c0392b; }
.duel-mu-bar-fill.duel-mu-trailing { background: #c0392b; }

.duel-mu-odds {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
}

.duel-mu-block-left .duel-mu-odds {
  margin-left: auto;
}

.duel-mu-block-right .duel-mu-odds {
  margin-right: auto;
}

/* Progress bar — starts beside the shield, pulled up to its bottom edge */
.duel-mu-bar {
  grid-row: 2;
  grid-column: 1 / -1;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: -6px;
}

.duel-mu-block-left .duel-mu-bar {
  grid-column: 2;
  margin-left: -20px;
}

.duel-mu-block-right .duel-mu-bar {
  grid-column: 1;
  margin-right: -20px;
}

.duel-mu-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: #009987;
  transition: width 0.4s ease-out;
}

.duel-mu-bar-rtl {
  direction: rtl;
}

/* Bottom row: name + leg squares — spans both columns */
.duel-mu-bottom-row {
  display: flex;
  align-items: center;
  gap: 8px;
  grid-row: 3;
  grid-column: 1 / -1;
}

.duel-mu-block-right .duel-mu-bottom-row {
  justify-content: flex-end;
}

.duel-mu-block-left .duel-mu-bottom-row { padding-left: 2px; }
.duel-mu-block-right .duel-mu-bottom-row { padding-right: 2px; }

/* Player name */
.duel-mu-name {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.duel-mu-vs {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.25);
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Settled duel: winner/loser name colors + WIN chip */
.duel-mu-name.duel-mu-winner {
  color: #2ecc71;
}

.duel-mu-name.duel-mu-loser {
  color: #e74c3c;
}

.duel-mu-win-chip {
  font-size: 10px;
  font-weight: 700;
  color: #2ecc71;
  background: rgba(46, 204, 113, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* =============================================================================
   DUEL LEG STATUS SQUARES (per-leg indicators in player blocks)
   ============================================================================= */

.duel-leg-squares { display: flex; gap: 4px; }

.duel-leg-sq {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.duel-leg-pending { background: rgba(255, 255, 255, 0.15); }
.duel-leg-void    { background: rgba(255, 255, 255, 0.4); }
.duel-leg-live    { background: #f5a623; }
.duel-leg-hit     { background: #009987; }
.duel-leg-miss    { background: #e74c3c; }

.duel-status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.duel-status-badge.pending {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.duel-status-badge.active {
  background: rgba(0, 211, 189, 0.15);
  color: #00D3BD;
}

.duel-status-badge.duel-won {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.duel-status-badge.duel-lost {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.duel-status-badge.duel-draw {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
}

.duel-status-badge.cancelled {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
}


.duel-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 0 16px;
}

.duel-copy-image-btn {
  margin-left: auto;
}

.duel-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.duel-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
}

.duel-action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.duel-share-btn:hover {
  border-color: rgba(0, 211, 189, 0.4);
  color: #00D3BD;
}

.duel-cancel-btn:hover {
  border-color: rgba(231, 76, 60, 0.4);
  color: #e74c3c;
}

/* =============================================================================
   DUEL SHARE MODAL
   ============================================================================= */

.duel-share-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-share-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.duel-share-modal-content {
  position: relative;
  z-index: 1;
  background: #0a1628;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}

.duel-share-modal-content h3 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 8px;
}

.duel-share-modal-content h3 i {
  color: #00D3BD;
  margin-right: 6px;
}

.duel-share-modal-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin: 0 0 16px;
}

.duel-share-link-row {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}

.duel-share-link-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 13px;
  outline: none;
}

.duel-share-link-input:focus {
  border-color: rgba(0, 211, 189, 0.5);
}

.duel-share-copy-btn {
  display: block;
  margin: 16px auto 0;
  background: #00D3BD;
  color: #060e1e;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.duel-share-copy-btn:hover {
  opacity: 0.85;
}

.duel-share-code-text {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 4px 0 16px !important;
}

@media (max-width: 1000px) {
  .duel-share-modal-content {
    max-width: 95%;
    padding: 48px 32px;
    border-radius: 20px;
  }

  .duel-share-modal-content h3 {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .duel-share-modal-content h3 i {
    margin-right: 10px;
  }

  .duel-share-modal-content p {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .duel-share-link-row {
    gap: 10px;
    margin-bottom: 16px;
  }

  .duel-share-link-input {
    padding: 16px 18px;
    font-size: 20px;
    border-radius: 12px;
  }

  .duel-share-copy-btn {
    margin-top: 24px;
    padding: 16px 48px;
    font-size: 22px;
    border-radius: 12px;
  }

  .duel-share-code-text {
    font-size: 18px;
    margin: 8px 0 24px !important;
  }
}

/* ---- Set Username Modal (pre-duel) ---- */

.duel-username-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-username-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.duel-username-modal-content {
  position: relative;
  z-index: 1;
  background: #0a1628;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 380px;
  width: 90%;
  text-align: center;
}

.duel-username-modal-content h3 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 8px;
}

.duel-username-modal-content p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin: 0 0 16px;
}

.duel-username-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 16px;
  outline: none;
  text-align: center;
}

.duel-username-input:focus {
  border-color: rgba(0, 211, 189, 0.5);
}

.duel-username-error {
  color: #ff4444 !important;
  font-size: 13px;
  font-weight: 600;
  min-height: 18px;
  margin: 8px 0 4px !important;
}

.duel-username-save-btn {
  display: block;
  margin: 8px auto 0;
  background: #00D3BD;
  color: #060e1e;
  border: none;
  border-radius: 8px;
  padding: 10px 32px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.15s;
}

.duel-username-save-btn:hover {
  opacity: 0.85;
}

.duel-username-save-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 1000px) {
  .duel-username-modal-content {
    max-width: 600px;
    padding: 40px 32px;
    border-radius: 20px;
  }

  .duel-username-modal-content h3 {
    font-size: 28px;
    margin-bottom: 12px;
  }

  .duel-username-modal-content p {
    font-size: 24px;
    margin-bottom: 24px;
  }

  .duel-username-input {
    padding: 18px 20px;
    font-size: 42px;
    border-radius: 14px;
  }

  .duel-username-error {
    font-size: 24px;
    min-height: 30px;
    margin: 12px 0 6px !important;
  }

  .duel-username-save-btn {
    margin-top: 18px;
    padding: 18px 48px;
    font-size: 24px;
    border-radius: 14px;
  }
}

/* =============================================================================
   DUEL LANDING PAGE
   ============================================================================= */

.duel-landing {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.duel-landing-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 32px 36px;
  max-width: 440px;
  width: 100%;
  text-align: center;
}

.duel-landing-icon {
  font-size: 64px;
  color: #00D3BD;
  margin-bottom: 8px;
  line-height: 1;
}

.duel-landing-title {
  color: rgba(255, 255, 255, 0.6);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 24px;
}

.duel-landing-subtitle {
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.3;
}

.duel-landing-details {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.duel-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.duel-detail-row + .duel-detail-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.duel-detail-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.duel-detail-value {
  font-size: 13px;
  color: #fff;
  font-weight: 600;
}

.duel-landing-rules {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 24px;
}

.duel-landing-rules strong {
  color: #00D3BD;
}

/* Odds range hint on challenge card */
.duel-landing-odds-range {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 16px;
}

.duel-landing-odds-range strong {
  color: #00D3BD;
}

.duel-accept-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #00D3BD;
  color: #060e1e;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s;
}

.duel-accept-btn:hover {
  opacity: 0.85;
}

.duel-landing-code {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.25);
  font-family: monospace;
  margin-top: 20px;
}

/* Settled duel scores (landing page) */
.duel-landing-scores {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 20px 0;
}

.duel-score-block {
  text-align: center;
  padding: 12px 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  min-width: 100px;
}

.duel-score-block.duel-winner {
  border: 1px solid rgba(46, 204, 113, 0.3);
}

.duel-score-block.duel-loser {
  border: 1px solid rgba(255, 255, 255, 0.08);
  opacity: 0.6;
}

.duel-score-name {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.duel-score-value {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.duel-winner .duel-score-value {
  color: #2ecc71;
}

.duel-score-vs {
  color: rgba(255, 255, 255, 0.3);
  font-size: 13px;
  font-weight: 700;
}

/* =============================================================================
   DUEL PREVIEW TICKET (pending landing page)
   ============================================================================= */

/* Leg rows: avatar column with blurred redacted bars */
.duel-preview-legs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 20px;
  padding: 0 12px;
  text-align: left;
}

.duel-preview-leg-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.duel-preview-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  object-fit: cover;
  background: transparent;
  flex-shrink: 0;
}

.duel-preview-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.duel-preview-team-badge {
  position: absolute;
  bottom: -2px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: transparent;
  border: none;
  object-fit: contain;
}

.duel-preview-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
}

.duel-preview-leg-info {
  flex: 1;
  min-width: 0;
}
.duel-preview-leg-player {
  font-weight: 600;
  font-size: 14px;
  color: #E6EDF3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.duel-preview-leg-pick {
  font-size: 13px;
  color: #8b949e;
  margin-top: 2px;
}
.duel-preview-leg-odds {
  color: var(--theme-accent, #00D3BD);
  font-weight: 600;
}

@media (max-width: 1000px) {
  .duel-preview-legs-list {
    gap: 24px;
    margin-bottom: 28px;
    padding: 0 8px;
  }

  .duel-preview-leg-row {
    gap: 16px;
  }

  .duel-preview-avatar {
    width: 74px;
    height: 74px;
  }

  .duel-preview-avatar-fallback {
    font-size: 28px;
  }

  .duel-preview-leg-player {
    font-size: 16px;
  }
  .duel-preview-leg-pick {
    font-size: 14px;
  }
}

.duel-preview-odds {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

.duel-preview-odds-value {
  font-size: 26px;
  font-weight: 800;
  color: #00D3BD;
}

.duel-preview-odds-sep {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.2);
}

.duel-preview-odds-count {
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.5);
}

.duel-preview-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 4px;
}

.duel-preview-meta:last-of-type {
  margin-bottom: 20px;
}

.duel-preview-meta-sep {
  margin: 0 6px;
  color: rgba(255, 255, 255, 0.2);
}

/* ── Responsive: scale up duel landing card on mobile ── */
@media (max-width: 1000px) {
  .duel-landing {
    align-items: flex-start;
    padding: 60px 16px 40px;
  }

  .duel-landing-card {
    max-width: 100%;
    padding: 48px 28px;
    border-radius: 20px;
  }

  .duel-landing-icon {
    font-size: 56px;
    margin-bottom: 20px;
  }

  .duel-landing-title {
    font-size: 24px;
    margin-bottom: 28px;
  }

  .duel-landing-subtitle {
    font-size: 34px;
    margin-bottom: 12px;
  }

  .duel-preview-avatars {
    margin-bottom: 24px;
  }

  .duel-preview-avatar-fallback {
    font-size: 26px;
  }

  .duel-preview-odds {
    gap: 12px;
    margin-bottom: 20px;
  }

  .duel-preview-odds-value {
    font-size: 42px;
  }

  .duel-preview-odds-sep {
    font-size: 28px;
  }

  .duel-preview-odds-count {
    font-size: 22px;
  }

  .duel-preview-meta {
    font-size: 20px;
    margin-bottom: 6px;
  }

  .duel-preview-meta:last-of-type {
    margin-bottom: 32px;
  }

  .duel-landing-odds-range {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .duel-accept-btn {
    padding: 16px 40px;
    font-size: 22px;
    border-radius: 14px;
  }

  .duel-landing-code {
    font-size: 16px;
    margin-top: 28px;
  }
}

/* Settled card extra styling */
.duel-settled-card .duel-landing-icon {
  color: #f1c40f;
}

/* =============================================================================
   DUEL BADGE (in parlay card header)
   ============================================================================= */

.parlay-duel-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0, 211, 189, 0.2);
  color: #00D3BD;
  white-space: nowrap;
}

.parlay-duel-badge i {
  margin-right: 3px;
  font-size: 9px;
}

.parlay-flex-badge {
  padding: 3px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
  white-space: nowrap;
}

.parlay-flex-badge i {
  margin-right: 3px;
  font-size: 9px;
}

/* =============================================================================
   CHALLENGE BUTTON (in parlay card actions)
   ============================================================================= */

.parlay-duel-btn {
  background: #00D3BD;
  color: #060e1e;
  border: 1px solid #00D3BD;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.parlay-duel-btn:hover {
  background: #00e8cf;
  border-color: #00e8cf;
  color: #060e1e;
}

/* Cash Out + Challenge buttons inline in wager/to-win footer */
.parlay-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* =============================================================================
   DUEL MODE BANNER (workbench)
   ============================================================================= */

.duel-mode-banner {
  background: rgba(0, 211, 189, 0.08);
  border: 1px solid rgba(0, 211, 189, 0.25);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
  text-align: center;
  width: fit-content;
  margin: 0 auto 10px;
}

.duel-banner-icon {
  font-size: 24px;
  vertical-align: middle;
  margin-right: 4px;
  display: inline-block;
  margin-top: -4px; /* adjust to move icon up/down on desktop */
}

/* Inside buttons: prevent icon from expanding button height */
button .duel-banner-icon {
  margin-right: 1px;
  font-size: 24px;
  margin-top: -4px;
  line-height: 0;
  vertical-align: middle;
}

@media (max-width: 1000px) {
  .duel-mode-banner {
    font-size: 24px;
    padding: 18px 20px 16px 20px;
    border-radius: 14px;
  }

  .duel-banner-icon {
    font-size: 32px;
  }

  button .duel-banner-icon {
    font-size: 1.2em;
    margin-top: 2px;
  }

  .parlay-footer-actions {
    gap: 14px;
  }

  .parlay-duel-btn {
    padding: 10px 22px;
    font-size: 18px;
    border-radius: 10px;
  }
}

/* Odds range indicator classes (workbench parlay builder) */
.duel-odds-ok {
  color: #00D3BD !important;
}

.duel-odds-out {
  color: #e74c3c !important;
}

.duel-mode-banner strong {
  color: #00D3BD;
}

.duel-mode-expired {
  background: rgba(231, 76, 60, 0.08);
  border-color: rgba(231, 76, 60, 0.25);
  color: rgba(255, 255, 255, 0.6);
}

.duel-banner-link {
  color: rgba(255, 255, 255, 0.5);
  margin-left: 8px;
  font-size: inherit;
  text-decoration: underline;
}

/* =============================================================================
   DUEL CHALLENGE POPUP (workbench — inline card replacing parlay container)
   ============================================================================= */

/* Hide normal parlay column children when challenge card is shown */
#your-parlay-column > .duel-challenge-hidden {
  display: none !important;
}

.duel-challenge-popup {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 20px 0;
}

.duel-challenge-popup-content {
  position: relative;
  text-align: center;
  width: 100%;
}

/* --- headline ------------------------------------------------------------- */
.duel-challenge-popup-title {
  color: rgba(255, 255, 255, 0.85);
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 6px;
  line-height: 1.25;
}

.duel-challenge-popup-title strong {
  color: #fff;
  font-weight: 800;
}

.duel-challenge-popup-subtitle {
  color: rgba(255, 255, 255, 0.55);
  font-size: 13.5px;
  margin: 0 0 18px;
}

.duel-accent,
.duel-challenge-popup-subtitle strong {
  color: var(--theme-accent, #00D3BD);
  font-weight: 600;
}

/* --- panels --------------------------------------------------------------- */
.duel-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 16px 14px;
  margin: 0 0 12px;
}

.duel-panel-title-odds {
  color: var(--theme-accent-bright, #00F5D4);
  font-weight: 800;
}

.duel-panel-title {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--theme-accent, #00D3BD);
  text-align: center;
}

.duel-challenge-popup .duel-preview-legs-list {
  padding: 0;
  margin: 0;
  gap: 14px;
  width: auto;
}

/* Odds sit in their own right-hand column, not trailing the pick text. */
.duel-challenge-popup .duel-preview-leg-odds {
  flex-shrink: 0;
  margin-left: auto;
  padding-left: 10px;
  font-size: 17px;
  font-weight: 700;
}

.duel-challenge-popup .duel-preview-avatar {
  width: 46px;
  height: 46px;
}

.duel-challenge-popup .duel-preview-leg-player {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.duel-challenge-popup .duel-preview-leg-pick {
  font-size: 13px;
  color: var(--theme-accent, #00D3BD);
}

/* --- requirements --------------------------------------------------------- */
.duel-req {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 2px;
  text-align: left;
}

.duel-req + .duel-req {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.duel-req-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(0, 211, 189, 0.4);
  color: var(--theme-accent, #00D3BD);
  font-size: 12px;
}

.duel-req-icon-num {
  font-size: 14px;
  font-weight: 700;
}

.duel-req-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.85);
}

.duel-req-text strong {
  color: var(--theme-accent, #00D3BD);
  font-weight: 700;
}

.duel-req-note {
  margin: 6px 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
}

/* --- actions -------------------------------------------------------------- */
.duel-challenge-popup-accept {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  margin: 4px 0 0;
  font-size: 15px;
  font-weight: 700;
}

.duel-challenge-popup-close {
  display: block;
  width: 100%;
  margin: 10px auto 0;
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.75);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 6px 8px;
  transition: color 0.15s;
}

.duel-challenge-popup-close:hover {
  color: #ef4444;
}

.duel-challenge-popup-view {
  margin-top: 0;
}

.duel-challenge-popup-view a {
  color: rgba(255, 255, 255, 0.4);
  font-size: 12px;
  text-decoration: underline;
}

.duel-challenge-popup-view a:hover {
  color: rgba(255, 255, 255, 0.7);
}


@media (max-width: 1000px) {
  .duel-challenge-popup {
    padding: 32px 0;
  }

  .duel-challenge-popup-title {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .duel-challenge-popup-subtitle {
    font-size: 24px;
    margin-bottom: 32px;
  }

  .duel-challenge-popup .duel-preview-legs-list {
    margin-bottom: 28px;
  }

  .duel-challenge-popup .duel-preview-leg-player {
    font-size: 24px;
  }

  .duel-challenge-popup .duel-preview-leg-pick {
    font-size: 24px;
  }

  .duel-challenge-popup .duel-preview-leg-odds {
    font-size: 26px;
  }

  /* Must be popup-scoped: the desktop rule .duel-challenge-popup
     .duel-preview-avatar is (0,2,0) and sits outside any media query, so a bare
     .duel-preview-avatar here would lose to it and silently keep 46px. */
  .duel-challenge-popup .duel-preview-avatar {
    width: 74px;
    height: 74px;
  }

  .duel-panel {
    padding: 22px 18px;
    margin-bottom: 20px;
  }

  .duel-panel-title {
    font-size: 17px;
    margin-bottom: 20px;
  }

  .duel-req { gap: 16px; padding: 16px 2px; }
  .duel-req-text { font-size: 25px; line-height: 1.35; }
  .duel-req-note { font-size: 20px; margin-top: 12px; }
  .duel-req-icon { width: 52px; height: 52px; font-size: 22px; }
  .duel-req-icon-num { font-size: 24px; }

  .duel-challenge-popup-close {
    font-size: 20px;
  }

  .duel-challenge-popup-accept {
    padding: 18px 48px;
    font-size: 24px;
    border-radius: 14px;
  }

  .duel-challenge-popup-view a {
    font-size: 24px;
  }
}

/* Persistent duel info bar above parlay container */
.duel-view-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 16px;
  font-weight: 600;
}

.duel-view-link-info {
  color: rgba(255, 255, 255, 0.6);
}

.duel-view-link-info strong {
  color: #00D3BD;
  font-weight: inherit;
}

.duel-view-link-sep {
  color: rgba(255, 255, 255, 0.2);
}

.duel-view-link a {
  color: rgba(0, 211, 189, 0.7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  background: rgba(0, 211, 189, 0.08);
  border: 1px solid rgba(0, 211, 189, 0.25);
  border-radius: 20px;
  padding: 2px 8px 2px 6px;
  margin-left: 6px;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.duel-view-link a:hover {
  color: #00D3BD;
  background: rgba(0, 211, 189, 0.12);
  border-color: rgba(0, 211, 189, 0.5);
}

.duel-view-link-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.duel-view-link-dismiss {
  background: none;
  border: none;
  color: rgba(239, 68, 68, 0.6);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 2px 8px;
  margin-top: 4px;
  transition: color 0.15s;
}

.duel-view-link-dismiss:hover {
  color: rgba(239, 68, 68, 0.9);
}

@media (max-width: 1000px) {
  .duel-view-link {
    margin-bottom: 32px;
    font-size: 28px;
    gap: 10px;
  }

  .duel-view-link a {
    padding: 6px 16px 6px 12px;
    border-radius: 999px;
    font-size: 24px;
    margin-left: 12px;
  }

  .duel-view-link-dismiss,
  .duel-challenge-popup-close {
    margin-top: 24px;
    font-size: 24px;
  }
}

/* =============================================================================
   DUEL EXPANDED VIEW (both parlays' legs)
   ============================================================================= */

.duel-parlays-row {
  display: flex;
  flex-direction: row;
  gap: 2px;
  margin-top: 8px;
}

.duel-parlay-side {
  flex: 1;
  min-width: 0;
}

.duel-parlay-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 6px;
  padding-left: 2px;
}

.duel-parlay-empty {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  padding: 16px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

/* =============================================================================
   COMPACT INLINE SCOREBOARD (inside duel parlay cards)
   ============================================================================= */

.game-scoreboard-inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 0;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-muted);
}

.game-inline-team {
  font-weight: 700;
  color: var(--ink-muted);
}

.game-inline-pts {
  font-weight: 700;
  font-size: 13px;
  color: var(--ink-muted);
}

.game-inline-dash {
  color: var(--ink-muted);
}

.game-inline-clock {
  color: var(--ink-muted);
  font-size: 11px;
  margin-left: 4px;
}

/* Strip parlay card chrome inside duels — show legs only */
.duel-parlay-side .parlay-card {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.duel-parlay-side .parlay-card-header {
  display: none;
}

.duel-parlay-side .parlay-card.parlay-collapsed .parlay-card-legs {
  display: block;
}

.duel-parlay-side .parlay-card-footer,
.duel-parlay-side .parlay-card-actions {
  display: none;
}


.duel-parlay-side .leg-odds {
  color: rgba(255, 255, 255, 0.45);
}

.duel-parlay-side .leg-details {
  color: var(--ink-muted);
  margin-top: 1px;
}


/* Reduce outer padding so legs sit closer to the card edge */
.duel-parlay-side:first-child .parlay-leg {
  padding-left: 10px;
}
.duel-parlay-side:last-child .parlay-leg {
  padding-right: 10px;
}

/* Move result indicator to the right end of the leg row */
.duel-parlay-side .parlay-leg {
  align-items: flex-start;
}

/* Extra space below settled legs (no progress bar) before next matchup line */
.duel-parlay-side .parlay-leg.leg-settled {
  padding-bottom: 10px;
}

/* Smaller result indicator circles in duel legs */
.duel-parlay-side .leg-result {
  width: 14px;
  height: 14px;
  font-size: 7px;
}

/* Left column: result indicator on the right */
.duel-parlay-side:first-child .leg-result {
  order: 10;
  margin-top: 2px;
}

/* Even out avatar-to-content spacing between left and right columns */
.duel-parlay-side:first-child .leg-avatar-wrap,
.duel-parlay-side:first-child .leg-team-logo {
  margin-right: 4px;
}

/* Right column: mirrored leg layout */
.duel-parlay-side:last-child .leg-result {
  order: -1;
  margin-top: 2px;
}

.duel-parlay-side:last-child .leg-avatar-wrap,
.duel-parlay-side:last-child .leg-team-logo {
  order: 10;
}

.duel-parlay-side:last-child .leg-header-row {
  flex-direction: row-reverse;
}

.duel-parlay-side:last-child .leg-details {
  text-align: right;
}

/* Align progress bar with leg text (remove negative margin used in full cards) */
.duel-parlay-side .leg-progress-bar {
  --side-width: 36px;
  margin-left: 0;
  margin-bottom: 0px;
}

/* Smaller progress oval in compact duel legs */
.duel-parlay-side .leg-progress-oval {
  padding: 0 5px;
  font-size: 9px;
  min-width: 16px;
}

/* Fixed height so legs with and without a progress bar take equal space */
.duel-parlay-side .parlay-leg {
  min-height: 94px;
  padding-bottom: 0px;
}

/* Game header embedded inside leg content — match .leg-details style */
.duel-parlay-side .game-scoreboard-inline {
  padding: 0;
  margin: 0;
  margin-top: 8px;
  font-size: 12px;
  font-weight: normal;
  color: var(--ink-muted);
  justify-content: flex-start;
}

.duel-parlay-side .game-scoreboard-inline .game-inline-team,
.duel-parlay-side .game-scoreboard-inline .game-inline-pts,
.duel-parlay-side .game-scoreboard-inline .game-inline-dash,
.duel-parlay-side .game-scoreboard-inline .game-inline-clock {
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.duel-parlay-side .game-matchup-header {
  display: block;
  padding: 0;
  margin: 0;
  margin-top: 8px;
  border-top: none;
}

.duel-parlay-side .game-matchup-text {
  font-size: 12px;
  font-weight: normal;
  color: var(--ink-muted);
}

/* Right column: right-align game headers */
.duel-parlay-side:last-child .game-scoreboard-inline {
  justify-content: flex-end;
}

.duel-parlay-side:last-child .game-matchup-header {
  text-align: right;
}

/* Extend game info and progress bar to align with avatar edge (avatar 36px + gap 8px) */
.duel-parlay-side:first-child .game-scoreboard-inline,
.duel-parlay-side:first-child .game-matchup-header,
.duel-parlay-side:first-child .leg-progress-bar {
  margin-left: -44px;
}

.duel-parlay-side:last-child .game-scoreboard-inline,
.duel-parlay-side:last-child .game-matchup-header,
.duel-parlay-side:last-child .leg-progress-bar {
  margin-right: -44px;
}

@media (max-width: 1000px) {

  .duels-section-header {
    display: none;
  }

  /* Circular border around duel matchup header */
  .duel-mu-header {
    /* background: transparent; */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 22px 22px;
    margin-left: 12px;
    margin-right: 12px;
    background: rgba(255, 255, 255, 0.01);
    /* border: 1px solid rgba(0, 211, 189, 0.15);
    box-shadow: 0 0 8px rgba(0, 211, 189, 0.12), 0 0 20px rgba(0, 211, 189, 0.06); */
  }

  /* Scale up matchup header for mobile */
  .duel-mu-shield-col .rank-shield-img { width: 56px; }
  .duel-mu-avatar { width: 52px; height: 52px; font-size: 24px; }
  .duel-mu-pct { font-size: 20px; }
  .duel-mu-odds { font-size: 20px; }
  .duel-mu-name { font-size: 24px; }
  .duel-mu-vs { font-size: 14px; }
  .duel-mu-top-row { margin-top: -6px; margin-bottom: 10px; }
  .duel-mu-block-left .duel-mu-top-row { padding-left: 0; }
  .duel-mu-block-right .duel-mu-top-row { padding-right: 0; }
  .duel-mu-bar { height: 8px; border-radius: 40px; margin-top: -14px;}
  .duel-mu-block-left .duel-mu-bar {
    margin-left: -38px;
  }

  .duel-mu-block-right .duel-mu-bar {
    margin-right: -38px;
  }
  .duel-mu-bar-fill { border-radius: 4px; }
  .duel-mu-block { gap: 6px 12px; }
  .duel-mu-bottom-row { gap: 12px; }
  .duel-mu-block-left .duel-mu-bottom-row { padding-left: 4px; }
  .duel-mu-block-right .duel-mu-bottom-row { padding-right: 4px; }
  .duel-leg-sq { width: 14px; height: 14px; border-radius: 4px; }
  .duel-leg-squares { gap: 5px; }
  .duel-mu-win-chip { font-size: 12px; padding: 2px 8px; }

  .duel-parlay-side .parlay-leg {
    min-height: 148px;
    padding-bottom: 0px;
  }

  /* Reset desktop reduced outer padding */
  .duel-parlay-side:first-child .parlay-leg {
    padding-left: 24px;
  }
  .duel-parlay-side:last-child .parlay-leg {
    padding-right: 24px;
  }

  /* Override base .leg-settled reduced padding-left (designed for result indicator
     on the left) — in duels the indicator is re-ordered, so keep padding uniform */
  .duel-parlay-side .parlay-leg.leg-settled {
    padding-left: 24px;
  }


  .duel-parlay-side .leg-avatar-wrap {
    width: 44px;
    height: 44px;
  }

  .duel-parlay-side .leg-team-logo {
    width: 44px;
    height: 44px;
  }

  .duel-parlay-side .leg-team-badge {
    width: 18px;
    height: 18px;
    bottom: -3px;
    right: -4px;
  }

  /* Align game info and progress bar with avatar edge (not text edge) */
  .duel-parlay-side:first-child .game-scoreboard-inline,
  .duel-parlay-side:first-child .game-matchup-header,
  .duel-parlay-side:first-child .leg-progress-bar {
    margin-left: -54px;
  }

  .duel-parlay-side:last-child .game-scoreboard-inline,
  .duel-parlay-side:last-child .game-matchup-header,
  .duel-parlay-side:last-child .leg-progress-bar {
    margin-right: -54px;
  }

  .duel-parlay-side .leg-details {
    margin-top: -4px;
  }

  .duel-parlay-side .leg-progress-oval {
    padding: 1px 7px;
    font-size: 11px;
    min-width: 20px;
  }

  .duel-parlay-side .leg-progress-bar {
    --side-width: 67px;
  }

  .duel-parlay-side .game-scoreboard-inline,
  .duel-parlay-side .game-matchup-text,
  .duel-parlay-side .leg-details {
    font-size: 20px;
  }

  /* Reset desktop reduced result indicator size for mobile */
  .duel-parlay-side .leg-result {
    width: 20px;
    height: 20px;
    font-size: 12px;
    margin-top: 6px !important;
  }

  /* Reset desktop margin-top on game headers for mobile */
  .duel-parlay-side .game-scoreboard-inline,
  .duel-parlay-side .game-matchup-header {
    margin-top: 0;
  }

  .duel-card {
    border: none;
    border-radius: 0;
    padding: 14px 8px;
    margin-left: -12px;
    margin-right: -12px;
  }

  .duel-card-footer {
    padding: 0 24px;
  }

}

/* =============================================================================
   STAKE CHOICE MODAL (workbench — Stake vs Challenge popup)
   ============================================================================= */

.stake-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stake-choice-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.stake-choice-modal-content {
  position: relative;
  z-index: 1;
  background: #0a1628;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 28px 24px;
  max-width: 440px;
  width: 90%;
  text-align: center;
}

.stake-choice-modal-content h3 {
  color: #fff;
  font-size: 20px;
  margin: 0 0 6px;
}

.stake-choice-modal-content p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 14px;
  margin: 0 0 20px;
}

/* (The old Stake-vs-Challenge chooser view is gone — Save Parlay and
   Challenge are separate workbench footer buttons now. Its
   .stake-choice-buttons, .stake-choice-btn variants, .stake-choice-option
   and .stake-choice-desc rules were removed with it.) */

.stake-choice-modal-content p.stake-choice-error {
  color: #ff4444;
  font-size: 13px;
  font-weight: 600;
  min-height: 0;
  margin: 18px 0 0 !important;
}

/* No phantom gap while the error is empty */
.stake-choice-modal-content p.stake-choice-error:empty {
  margin: 0 !important;
}

/* ---- Challenge Accepted confirmation ---------------------------------- */
.duel-accepted-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 211, 189, 0.12);
  border: 1px solid rgba(0, 211, 189, 0.4);
  color: var(--theme-accent, #00D3BD);
  font-size: 24px;
}

.stake-choice-modal-content p.duel-accepted-sub {
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 22px;
}

.duel-accepted-view {
  display: block;
  width: 100%;
  padding: 15px 24px;
  border: none;
  border-radius: 12px;
  background: var(--theme-gradient-primary,
    linear-gradient(135deg, #00F5D4 0%, #00D3BD 50%, #00AD84 100%));
  color: #000;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.duel-accepted-view:hover {
  filter: brightness(1.06);
}

.duel-accepted-dismiss {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.duel-accepted-dismiss:hover { color: rgba(255, 255, 255, 0.75); }

@media (max-width: 1000px) {
  .duel-accepted-mark { width: 78px; height: 78px; font-size: 34px; margin-bottom: 22px; }
  .duel-accepted-view { font-size: 22px; padding: 22px 28px; border-radius: 14px; }
  .duel-accepted-dismiss { font-size: 20px; margin-top: 16px; padding: 14px; }
}

/* ── Stake mode cards (Standard vs Flex side-by-side) ── */
.stake-mode-cards {
  display: flex;
  gap: 12px;
}

.stake-mode-card {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 16px 14px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.stake-mode-card:hover {
  background: rgba(255, 255, 255, 0.07);
}

.stake-mode-card-standard {
  border-color: rgba(0, 211, 189, 0.3);
}

.stake-mode-card-standard:hover {
  border-color: rgba(0, 211, 189, 0.6);
}

.stake-mode-card-flex {
  border-color: rgba(255, 193, 7, 0.3);
}

.stake-mode-card-flex:hover:not(.disabled) {
  border-color: rgba(255, 193, 7, 0.6);
}

.stake-mode-card-flex.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: rgba(255, 255, 255, 0.08);
}

.stake-mode-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.stake-mode-card-header span {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.stake-mode-card-standard .stake-mode-card-header span {
  color: #00D3BD;
}

.stake-mode-card-flex:not(.disabled) .stake-mode-card-header span {
  color: #ffc107;
}

.stake-mode-card-subtitle {
  color: rgba(255, 255, 255, 0.45);
  font-size: 12px;
  margin: 0 0 12px !important;
  line-height: 1.3;
}

.stake-mode-card-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stake-mode-payout-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

.stake-mode-payout-val {
  font-weight: 700;
  color: #00D3BD;
}

.stake-mode-card-flex .stake-mode-payout-val {
  color: #ffc107;
}

/* Selected state */
.stake-mode-card-standard.selected {
  border-color: #00D3BD;
  background: rgba(0, 211, 189, 0.08);
}

.stake-mode-card-flex.selected {
  border-color: #ffc107;
  background: rgba(255, 193, 7, 0.08);
}

/* Save Only (no stake) — full-width DEFAULT option at the top */
.stake-mode-card-track {
  margin: 2px 0 14px;
  border-color: rgba(255, 255, 255, 0.18);
}

.stake-mode-card-track:hover {
  border-color: rgba(255, 255, 255, 0.35);
}

.stake-mode-card-track.selected {
  border-color: #00D3BD;
  background: rgba(0, 211, 189, 0.10);
  box-shadow: 0 0 0 1px rgba(0, 211, 189, 0.35);
}

/* Balance + amount picker — sits BELOW the Standard/Flex cards, hidden
   entirely while Save Only is selected (they only mean something when
   chips are going on the line) */
.stake-context {
  margin-top: 16px;
}

.stake-context p {
  margin-bottom: 0;
  color: #fff;
  font-weight: 600;
}

.stake-context-hidden {
  display: none;
}

/* Confirm button */
.stake-mode-confirm-btn {
  display: block;
  margin: 28px auto 0;
  padding: 11px 40px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  background: #00D3BD;
  color: #060e1e;
}

.stake-mode-confirm-btn:hover:not(:disabled) {
  background: #00e8cf;
}

.stake-mode-confirm-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* One-click challenge creating view (no type chooser — every challenge
   is open). Spinner + sub line are hidden by _resetChallengeBtn on error. */
.challenge-creating-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 18px 0 6px;
  font-size: 28px;
  color: var(--theme-accent-bright, #00F5D4);
}

@media (max-width: 1000px) {
  .challenge-creating-spinner {
    font-size: 40px;
    margin: 26px 0 10px;
  }
}

@media (max-width: 1000px) {
  /* Stake modal shell */
  .stake-choice-modal-content {
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 44px 30px;
    border-radius: 22px;
  }

  .stake-choice-modal-content h3 {
    font-size: 30px;
    margin-bottom: 12px;
  }

  .stake-choice-modal-content p {
    font-size: 22px;
    margin-bottom: 30px;
  }

  .stake-choice-modal-content p.stake-choice-error {
    font-size: 22px;
    margin: 26px 0 0 !important;
  }

  /* Step 2: Standard / Flex cards */
  .stake-mode-cards {
    gap: 14px;
  }

  .stake-mode-card {
    padding: 24px 20px;
    border-radius: 18px;
    border-width: 2px;
  }

  .stake-mode-card-header span {
    font-size: 24px;
  }

  .stake-mode-card-subtitle {
    font-size: 18px;
    margin-bottom: 18px !important;
  }

  .stake-mode-payout-row {
    font-size: 20px;
  }

  .stake-mode-card-rows {
    gap: 10px;
  }

  .stake-mode-confirm-btn {
    margin-top: 36px;
    padding: 21px 70px;
    font-size: 26px;
    border-radius: 18px;
  }
}

/* (Duel Type Chooser Modal CSS removed 2026-08-11 — one-click open
   challenges, no type chooser.) */

/* ── Chips stake amount picker (chips migration, plan §4.3) ──────────── */
.stake-amount-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 14px 0 18px;
}
.stake-amount-btn {
  flex: 0 0 auto;   /* never let the row squeeze the touch targets */
  width: 44px;
  height: 44px;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #e6edf3;
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.stake-amount-btn:hover { background: rgba(255, 255, 255, 0.12); }
.stake-amount-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 8px 16px;
}
.stake-amount-input {
  width: 74px;
  background: none;
  border: none;
  outline: none;
  color: var(--theme-accent, #00d3bd);
  font-size: 24px;
  font-weight: 800;
  font-family: inherit;
  text-align: center;
  -moz-appearance: textfield;
  appearance: textfield;
}
.stake-amount-input::-webkit-outer-spin-button,
.stake-amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
/* (.stake-amount-unit removed 2026-08-11 — the box shows just the number;
   the "chips" context lives in the Balance line above it) */

/* Mobile: bigger balance text + genuinely touch-sized stepper. Must live
   AFTER the base .stake-amount-* rules above — an override in the earlier
   media block would lose to them on file order. */
@media (max-width: 1000px) {
  .stake-context {
    margin-top: 26px;
  }

  .stake-context p {
    font-size: 22px;
    margin: 0;
  }

  .stake-amount-row {
    gap: 18px;
    margin: 16px 0 8px;
  }

  .stake-amount-btn {
    width: 74px;
    height: 74px;
    border-radius: 18px;
    font-size: 34px;
  }

  /* Compact content-width box — any squeeze lands on the input inside it,
     NEVER on the touch targets and never by ballooning the box */
  .stake-amount-box {
    flex: 0 1 auto;
    min-width: 0;
    padding: 14px 12px;
    border-radius: 18px;
  }

  .stake-amount-input {
    flex: 0 1 96px;
    width: auto;
    min-width: 44px;
    font-size: 34px;
  }
}

.stake-mode-confirm-btn.stake-mode-confirm-armed {
  background: #f5b942;
  color: #1a1205;
  font-size: 13px;
  line-height: 1.35;
  white-space: normal;
}

/* ── Share-view meta strip (cost · prize · deadline for first-timers) ──
   Placed at end of file: p.duel-share-meta ties on specificity with the
   .{stake-choice,duel-share}-modal-content p rules above (incl. their
   mobile blocks), so file order makes these win. */
p.duel-share-meta {
  margin: 16px 0 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 0.2px;
}

@media (max-width: 1000px) {
  p.duel-share-meta {
    font-size: 16px;
    margin: 20px 0 0;
  }
}

/* ── Receipt-mode save + View My Parlays (2026-08-11) ─────────────────
   Confirm keeps its label in the DOM; loading overlays a spinner
   (no content swap — swaps flicker), success flips the label to Saved. */
.stake-mode-confirm-btn {
  position: relative;
}

.stake-confirm-spinner {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
}

.stake-mode-confirm-btn.stake-mode-confirm-loading {
  opacity: 0.85;
  cursor: default;
}

.stake-mode-confirm-loading .stake-confirm-label {
  visibility: hidden;
}

.stake-mode-confirm-loading .stake-confirm-spinner {
  display: flex;
}

/* Saved is a completed state, not a disabled one — full opacity */
.stake-mode-confirm-btn.stake-mode-confirm-saved:disabled {
  opacity: 1;
  cursor: default;
}

.pb-view-parlays-btn {
  display: block;
  margin: 12px auto 0;
  padding: 9px 30px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: var(--ink-70, #c8e6d0);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pb-view-parlays-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.25);
}

@media (max-width: 1000px) {
  .pb-view-parlays-btn {
    margin-top: 18px;
    padding: 16px 50px;
    font-size: 22px;
    border-radius: 16px;
  }
}

/* ── Modal button row: primary action + View My Parlays side by side ── */
.pb-modal-btn-row {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  margin-top: 16px;
}

/* The save modal's Confirm sits a touch lower (founder spacing ask) */
.pb-modal-btn-row-confirm {
  margin-top: 28px;
}

/* The row owns the vertical rhythm — children lose their solo margins */
.pb-modal-btn-row .duel-share-copy-btn,
.pb-modal-btn-row .stake-mode-confirm-btn,
.pb-modal-btn-row .pb-view-parlays-btn {
  display: block;
  margin: 0;
}

@media (max-width: 1000px) {
  .pb-modal-btn-row {
    gap: 14px;
  }

  .pb-modal-btn-row-confirm {
    margin-top: 36px;
  }

  /* Side-by-side must fit a phone: View/Copy trade their solo-width
     paddings for compact ones */
  .pb-modal-btn-row .pb-view-parlays-btn,
  .pb-modal-btn-row .duel-share-copy-btn {
    flex: 0 1 auto;
    min-width: 0;
    padding: 14px 12px;
    font-size: 18px;
    white-space: nowrap;
    border-radius: 14px;
  }

  /* Confirm keeps its big solo mobile size pre-save; once it flips to
     "Saved" it shares the row with View, so it compacts too */
  .pb-modal-btn-row .stake-mode-confirm-btn.stake-mode-confirm-saved {
    padding: 14px 20px;
    font-size: 22px;
    white-space: nowrap;
  }
}
