/* ═══════════════════════════════════════════════════════════════
   subscription.css — Subscription tab
   ───────────────────────────────────────────────────────────────
   Selectors that ONLY render in the Subscription tab.
   Extracted from dashboard.css in Phase 3.5 (2026-05-30).
   Loaded AFTER dashboard.css; shared chrome lives there.
   ═══════════════════════════════════════════════════════════════ */

.dash-addon-status-badge {
  font-size: 0.65rem;
  color: var(--color-warning, #f59e0b);
  background: rgba(245, 158, 11, 0.1);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.dash-addons-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-addon-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface, #141720);
  border-radius: 8px;
  font-size: 0.88rem;
}

/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION
   ═══════════════════════════════════════════════════════════════ */

.dash-sub-layout { max-width: 700px; }

.dash-sub-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.dash-sub-header h2 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.3rem;
  font-weight: 700;
}

.dash-sub-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.dash-sub-label {
  font-size: 0.78rem;
  color: var(--text-muted, #5c6577);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dash-sub-value {
  font-size: 0.92rem;
  font-weight: 500;
}

.dash-credit-card {
  background: var(--bg-surface, #141720);
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: border-color 0.2s;
}

.dash-credit-card:hover {
  border-color: rgba(37, 211, 102, 0.3);
}

.dash-credit-amount {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary, #e8ecf1);
}

.dash-credit-label {
  font-size: 0.78rem;
  color: var(--text-muted, #5c6577);
  margin-bottom: 0.4rem;
}

.dash-credit-price {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--color-success);
  margin-bottom: 0.15rem;
}

.dash-credit-rate {
  font-size: 0.72rem;
  color: var(--text-muted, #5c6577);
  margin-bottom: 0.65rem;
}

/* ═══════════════════════════════════════════════════════════════
   TRIAL TIMELINE
   ═══════════════════════════════════════════════════════════════ */

.dash-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.25rem 0 0;
  padding-left: 0.5rem;
}

.dash-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  position: relative;
  padding-bottom: 1.25rem;
  padding-left: 0.75rem;
}

.dash-timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 14px;
  bottom: 0;
  width: 2px;
  background: var(--glass-border, rgba(255,255,255,0.08));
  transform: translateX(3px);
}

.dash-timeline-item:last-child { padding-bottom: 0; }

.dash-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
  background: var(--glass-border, rgba(255,255,255,0.15));
  border: 2px solid var(--bg-card, #181b23);
  box-shadow: 0 0 0 2px var(--glass-border, rgba(255,255,255,0.08));
}

.dash-timeline-done .dash-timeline-dot {
  background: var(--color-success);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.dash-timeline-active .dash-timeline-dot {
  background: var(--color-warning);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.dash-timeline-item div {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.dash-timeline-item strong {
  font-size: 0.85rem;
}

.dash-timeline-item span {
  font-size: 0.78rem;
  color: var(--text-muted, #5c6577);
}

.dash-snapshot-progress {
  height: 6px;
  width: 100%;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  overflow: hidden;
  margin: 0.15rem 0 0.1rem;
}

.dash-snapshot-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-green, #25D366), var(--accent-emerald, #10b981));
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ── (2) Plan-details card — quieter identity ────────────────────── */
.dash-sub-header--quiet {
  margin-bottom: 0.5rem;
}

.dash-sub-header--quiet h3 {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary, #e8ecf1);
  letter-spacing: -0.01em;
}

.dash-plan-status-sentence {
  font-size: 0.92rem;
  color: var(--text-secondary, #8b95a5);
  line-height: 1.5;
  margin: 0 0 1rem 0;
}

/* ── (3) Add-ons strip — horizontal, per-add-on layout ───────────── */
.dash-addons-strip {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.dash-addons-strip .dash-addon-card {
  flex: 1 1 220px;
  min-width: 180px;
}

.dash-addon-main {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.dash-addon-main strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-addon-qty {
  color: var(--text-muted, #5c6577);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ── (4) Wallets row — 2 symmetric account-level wallet cards ─────
   Refactor 2026-05-30: 3-up → 2-up. The retired third card duplicated
   the Channel balances section beneath; its per-currency summary now
   lives in that section's header. Both surviving cards have:
   - uniform title row min-height → titles never look ragged
   - uniform amount-row slot → balance numbers line up across cards
   - the recharge panel anatomy is identical across both cards. */
.dash-wallet-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* legacy 3-up — kept for any
                                            non-2up callers still around */
  gap: 0.85rem;
  margin-top: 0.5rem;
}
.dash-wallet-row--2up {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 720px) {
  .dash-wallet-row,
  .dash-wallet-row--2up {
    grid-template-columns: 1fr;
  }
}

.dash-wallet-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.1rem 1.15rem;
  border-radius: 12px;
  min-width: 0;
}

.dash-wallet-card--solid {
  background: rgba(37, 211, 102, 0.06);
  border: 1px solid rgba(37, 211, 102, 0.18);
  border-left: 4px solid var(--accent-green, #25D366);
}

.dash-wallet-card--outlined {
  background: transparent;
  border: 1px solid var(--glass-border, rgba(255,255,255,0.08));
}

.dash-wallet-card--list {
  /* Reserved — legacy variant from the 3-up era. No active rules. */
}

.dash-wallet-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  /* Lock head height so Card 1's single-line subtitle and Card 2's
     longer subtitle align across the row. 2 lines of 0.78rem subtitle
     at line-height 1.4 ≈ 2.18em; plus a 1.15rem title ≈ 4em total. */
  min-height: 3.4em;
}

.dash-wallet-card-icon {
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.dash-wallet-card-titles {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1;
}

.dash-wallet-card-title {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary, #e8ecf1);
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.dash-wallet-card-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #5c6577);
  font-style: normal;        /* dropped italic — felt decorative, not quiet */
  line-height: 1.4;
}

.dash-wallet-card-amount-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
  /* Lock the amount-row vertical slot so Card 1 (balance readout) and
     Card 2 (value-model block) align across the row. Sized for Card 1's
     1.6rem number + tiny label baseline; Card 2's two-line model block
     fits inside the same slot via its column override below. */
  min-height: 2.2rem;
}

/* Card 2 variant: the slot becomes a two-line value-model block instead
   of a number + label. Column layout, tight leading, left-aligned. No
   em-dash, no fake number — by design, this card has a different anatomy
   than Card 1 because it represents a different billing model. */
.dash-wallet-card-amount-row--model {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.2rem;
}

.dash-wallet-model-sub {
  font-size: 0.82rem;
  color: var(--text-muted, #5c6577);
  font-weight: 500;
  font-style: italic;
  line-height: 1.4;
}

.dash-wallet-amount-label {
  font-size: 0.72rem;
  color: var(--text-muted, #5c6577);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.dash-wallet-card-cta {
  align-self: flex-start;
}

/* Inline single-line GST / intl-fee cue beneath the recharge panel.
   Replaces an old inline-styled block that could wrap to two lines on
   narrow cards because of the cramped right-align width. */
.dash-wallet-fee-cue {
  font-size: 0.78rem;
  color: var(--text-muted, #5c6577);
  font-weight: 500;
  margin-top: 0.5rem;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Channel wallet list in Subscription tab ── */
.dash-ch-wallet-list {
  display: flex; flex-direction: column; gap: 0;
}
.dash-ch-wallet-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.65rem 0; border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}
.dash-ch-wallet-row:last-child { border-bottom: none; }
.dash-ch-wallet-info {
  display: flex; align-items: center; gap: 0.5rem; min-width: 0; flex: 1;
}
.dash-ch-wallet-detail {
  display: flex; flex-direction: column; min-width: 0; flex: 1;
}
.dash-ch-wallet-name {
  font-size: 0.82rem; font-weight: 600; color: var(--text-primary);
  /* Long-name hardening (belt + braces): never let a long handle wrap
     character-by-character. Single-line + ellipsis, no aggressive
     break-anywhere fallbacks. min-width:0 on the flex parent enables
     ellipsis inside the row. */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  overflow-wrap: normal; word-break: keep-all;
  min-width: 0;
}
.dash-ch-wallet-cat {
  font-size: 0.68rem; color: var(--text-muted); text-transform: capitalize;
}
.dash-ch-wallet-right {
  display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0;
}
.dash-ch-wallet-bal {
  font-size: 0.82rem; font-weight: 700; white-space: nowrap;
}
.dash-ch-wallet-item {
  border-bottom: 1px solid var(--border);
}
.dash-ch-wallet-item:last-child { border-bottom: none; }
.dash-ch-wallet-row { border-bottom: none; }

/* Amount preset pills */
.dash-recharge-pills {
  display: flex; gap: 0.4rem; margin-bottom: 0.6rem; flex-wrap: wrap;
}

/* Custom amount + pay button row.
   2026-05-30: relaxed the cramped max-width of the input wrap (was 160px
   — too narrow on wallet cards in the 2-up grid, "Enter a…" truncated)
   and gave the Pay button a fixed-ish footprint so the input grows. */
.dash-recharge-custom {
  display: flex; gap: 0.55rem; align-items: stretch;
  width: 100%;
}
.dash-recharge-input-wrap {
  display: flex; align-items: center; gap: 0;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 6px;
  flex: 1 1 auto;
  min-width: 0;        /* allows shrink below intrinsic input width */
  overflow: hidden;
}
.dash-recharge-input-wrap:focus-within {
  border-color: var(--accent-green, #25D366);
}
.dash-recharge-currency {
  padding: 0 0.55rem; font-size: 0.85rem; font-weight: 600;
  color: var(--text-muted); border-right: 1px solid var(--border);
  flex-shrink: 0;
}
.dash-recharge-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.45rem 0.55rem;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary, #e8ecf1);
  font-size: 0.88rem;
  font-weight: 500;
}
.dash-recharge-input::placeholder {
  color: var(--text-muted, #5c6577);
}
.dash-btn-recharge-go {
  flex-shrink: 0;
  white-space: nowrap;
}

/* ── RCS Channel Section ── */
.dash-rcs-section {
  border: 1px solid rgba(74,158,255,0.15);
  border-radius: 8px;
  background: rgba(74,158,255,0.03);
  padding: 0.25rem 0;
}
.dash-rcs-item {
  border-bottom-color: rgba(74,158,255,0.1) !important;
}
.dash-rcs-recharge-btn {
  background: rgba(74,158,255,0.1);
  color: #4A9EFF;
  border-color: rgba(74,158,255,0.2);
}
.dash-rcs-recharge-btn:hover {
  background: #4A9EFF;
  color: #fff;
  border-color: #4A9EFF;
}

/* ── Per-channel summary card — RETIRED 2026-05-30 ───────────────────
   The 3-up Card 3 has been retired in favour of a 2-up wallet row +
   richer Channel-balances header. The selectors below are intentionally
   left empty as a graveyard marker — kept so any stale references in
   external code don't 404. If you're adding new wallet-card styles,
   use .dash-wallet-card-* (above) or .dash-chbal-summary-* (below). */

/* ── Dedicated channel-balances section (full-width, below 2-up) ──── */
.dash-chbal-section {
  margin-top: var(--space-6, 2rem);
}
.dash-chbal-header-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dash-chbal-header {
  /* Inherits .dash-card-header. */
}
.dash-chbal-status {
  font-size: 0.78rem;
  color: var(--text-secondary, #c5cdd9);
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Channel-balances summary row — sits directly under the section title.
   Compact single-line strip carrying:
     "Per-channel funding · N channels · ₹X · $Y    [N LOW]"
   Multi-currency totals separated by ·.  LOW chip on the right edge. */
.dash-chbal-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-secondary, #c5cdd9);
  line-height: 1.45;
  padding-left: 0.1rem;
}
.dash-chbal-summary-label {
  color: var(--text-muted, #5c6577);
  font-weight: 600;
}
.dash-chbal-summary-count {
  color: var(--text-secondary, #c5cdd9);
  font-weight: 600;
}
.dash-chbal-summary-sep {
  color: var(--text-muted, #5c6577);
  opacity: 0.7;
}
.dash-chbal-summary-totals {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-weight: 700;
  color: var(--text-primary, #e8ecf1);
  letter-spacing: -0.005em;
  overflow-wrap: anywhere;
}
.dash-chbal-summary-low {
  margin-left: auto;     /* push LOW chip to the right edge of the row */
}
.dash-chbal-scroll {
  max-height: 480px;
  overflow-y: auto;
  margin-top: 0.5rem;
  /* Reserve a touch of inner padding so sticky search bar doesn't kiss
     the card edge when scrolled. */
  padding: 0 0.1rem;
}
.dash-chbal-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.4rem;
  background: var(--bg-primary, #0f1419);
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}
.dash-chbal-search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text-primary, #e8ecf1);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.2rem 0;
  min-width: 0;
}
.dash-chbal-search-input::placeholder {
  color: var(--text-muted, #5c6577);
  font-weight: 500;
}
.dash-chbal-group-header {
  font-family: var(--font-display, 'Outfit', sans-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary, #c5cdd9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.85rem 0 0.25rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.06));
}
.dash-chbal-group-header:first-child { margin-top: 0.4rem; }
.dash-chbal-row-wrap {
  /* Phase 5j-fix (2026-05-30): LOW pill now lives inside .dash-ch-wallet-right
     as a flex sibling, so this wrapper no longer needs to be a positioning
     context. Kept for the data-low="1" hook + future styling needs. */
}
.dash-chbal-low-pill {
  /* In-flow flex item inside .dash-ch-wallet-right.
     Sits left of the balance number, never overlaps. */
  flex-shrink: 0;
}
