/*
 * Mobile list cards (components/nb/mrow.blade.php), shared by every list page - organiser,
 * customer and admin. ≤ 767px: the page's table (.mrow-desktop) hides and its .mrow-list of
 * cards shows. ≥ 768px: the table, unchanged. Not scoped to .nb, so the admin layout uses
 * it too (both layouts load tokens.css).
 *
 *   [A]  Name                      ₹198
 *        +91 72498 52024
 *        Event · 2 passes
 *        ● Paid   ● Refund requested
 *   ---------------------------------
 *   (call) (wa)                View →
 */
.mrow-list { display: none; }
@media (max-width: 767px) {
  .mrow-list { display: block; }
  .mrow-desktop { display: none !important; }
}

.mrow {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto;
  grid-template-areas: "av who amt" "av meta meta" "pills pills pills" "extra extra extra" "foot foot foot";
  gap: 2px 12px; align-items: center; min-width: 0;
  background: #fff; border: 1px solid #EADFD6; border-radius: 16px; padding: 14px;
  color: #141414; font-family: var(--ff, "DM Sans", system-ui, sans-serif); text-align: left;
}
.mrow + .mrow { margin-top: 10px; }
.mrow--no-av { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who amt" "meta meta" "pills pills" "extra extra" "foot foot"; }
.mrow__av {
  grid-area: av; align-self: start; width: 40px; height: 40px; border-radius: 12px; background: #141414; color: #FE5C36;
  display: grid; place-items: center; font-family: var(--fd, "Unbounded", sans-serif); font-weight: 800; font-size: 14px; line-height: 1;
}
.mrow__who { grid-area: who; min-width: 0; }
.mrow__name {
  display: block; font-family: var(--fd, "Unbounded", sans-serif); font-weight: 700; font-size: 15px; line-height: 1.25;
  color: #141414; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
a.mrow__name:hover, a.mrow__name:focus-visible { color: #141414; text-decoration: underline; text-underline-offset: 3px; }
a.mrow__name:focus-visible { outline: 2px solid #FE5C36; outline-offset: 2px; border-radius: 4px; }
.mrow__sub { display: block; font-size: 13px; line-height: 1.35; color: #6B625B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__amt {
  grid-area: amt; align-self: start; font-family: var(--fd, "Unbounded", sans-serif); font-weight: 800; font-size: 16px;
  line-height: 1.25; white-space: nowrap; font-variant-numeric: tabular-nums; color: #141414;
}
.mrow__amt.is-pos { color: var(--ok, #127A5A); }
.mrow__amt.is-neg { color: var(--err, #C13A2E); }
.mrow__meta { grid-area: meta; min-width: 0; font-size: 13px; line-height: 1.35; color: #6B625B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow__pills { grid-area: pills; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-width: 0; }
.mrow__pill {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1; white-space: nowrap; flex: none; width: auto;
}
.mrow__pill::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mrow__pill.tone-ok { background: var(--ok-w, #E9F5F1); color: var(--ok, #127A5A); }
.mrow__pill.tone-warn { background: var(--warn-w, #FCF3E4); color: var(--warn, #986405); }
.mrow__pill.tone-err { background: var(--err-w, #FBEEEC); color: var(--err, #C13A2E); }
.mrow__pill.tone-neutral { background: #F1ECE7; color: #5E5650; }
.mrow__pill.tone-outline { background: transparent; color: #141414; box-shadow: inset 0 0 0 1.5px #141414; }
.mrow__extra { grid-area: extra; display: grid; gap: 8px; margin-top: 10px; min-width: 0; }
.mrow__extra form { display: flex; gap: 8px; align-items: center; margin: 0; min-width: 0; }
.mrow__extra select, .mrow__extra input {
  flex: 1 1 auto; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #EADFD6; border-radius: 10px;
  background: #fff; color: #141414; font: 500 15px/1 var(--ff, "DM Sans", sans-serif);
}
.mrow__foot {
  grid-area: foot; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 10px; border-top: 1px dashed #EADFD6; min-width: 0;
}
.mrow__icons { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.mrow__icon {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid #EADFD6; display: grid; place-items: center;
  color: #141414; text-decoration: none; flex: none;
}
.mrow__icon svg { width: 18px; height: 18px; }
.mrow__icon:hover { border-color: #141414; color: #141414; }
.mrow__icon:focus-visible, .mrow__view:focus-visible { outline: 2px solid #FE5C36; outline-offset: 2px; }
.mrow__view {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 4px; margin-left: auto; flex: none;
  font-weight: 700; font-size: 14px; color: #141414; text-decoration: none; white-space: nowrap;
}
.mrow__view::after { content: "→"; color: #FE5C36; }
.mrow__view:hover { color: #141414; text-decoration: underline; text-underline-offset: 3px; }
/* small footer actions passed in the slot (forms / buttons) */
.mrow__icons form { margin: 0; }
.mrow__act {
  display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1.5px solid #EADFD6; background: #fff; color: #141414; font: 700 13px/1 var(--ff, "DM Sans", sans-serif);
  text-decoration: none; white-space: nowrap; cursor: pointer;
}
.mrow__act:hover { border-color: #141414; }
.mrow__act.is-danger { color: var(--err, #C13A2E); }

/* every status / payment pill, everywhere, desktop included: content-width, text never wraps */
.status-badge, .adm-pill, .ev-pill, .mrow__pill { white-space: nowrap !important; width: auto !important; max-width: none !important; flex: none; }
/* ...except a refund chip (<x-refund-status>): "Refunded ₹300.00 · UTR 412345678901 · 10 Oct 2026" wraps inside
   the chip on a phone instead of widening the page (flow audit 07-06 / 07-08 / 10-02) */
.refund-status > .status-badge, .refund-status .ev-pill { white-space: normal !important; max-width: 100% !important; }
/* admin: the cards sit inside a padding-less .card-body */
.card-body > .mrow-list { padding: 12px; }
@media (max-width: 400px) { .card-body > .mrow-list { padding: 8px 6px; } }

/* very narrow cards (320px phones inside padded pages): a smaller avatar, name and amount,
   so the name keeps room and the amount still never wraps */
.mrow-list { container-type: inline-size; }
@container (max-width: 279px) {
  .mrow { grid-template-columns: 32px minmax(0, 1fr) auto; column-gap: 8px; padding: 12px; }
  .mrow--no-av { grid-template-columns: minmax(0, 1fr) auto; }
  .mrow__av { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
  .mrow__name { font-size: 13.5px; }
  .mrow__amt { font-size: 13.5px; }
}

/* the same card everywhere: layouts that colour every link (admin) don't recolour the card */
.mrow a.mrow__name, .mrow a.mrow__name:hover, .mrow a.mrow__name:focus-visible { color: #141414 !important; }
.mrow a.mrow__icon, .mrow a.mrow__view, .mrow .mrow__act { color: #141414 !important; }
.mrow .mrow__act.is-danger { color: var(--err, #C13A2E) !important; }
/* admin on phones: the cards are the frame - no card-in-a-card */
@media (max-width: 767px) {
  .card:has(> .card-body > .mrow-list) { background: transparent; border: 0; box-shadow: none; }
  .card:has(> .card-body > .mrow-list) > .card-body > .mrow-list { padding: 0; }
}
/* a refund on its way: amber and muted, never the green of money received */
.mrow__amt.is-pending { color: var(--warn, #9A6A00); opacity: .85; }
.nb .row-amount .is-pending { color: var(--warn, #9A6A00); font-weight: 600; opacity: .85; }
