/* ==========================================================================
 * Festival Studio - stand invites and My stand (Milestone A11)
 *
 *   st-inv-*       invite dialog and invite rows (ui/stand-invites.js)
 *   st-myinv-*     "Invites for you" on Your events (ui/my-invites.js)
 *   st-mystand-*   the My stand page (views/my-stand.js)
 *   st-invite-card the accept page (views/invite.js)
 * Nothing here moves, so there is nothing to switch off for reduced motion.
 * ========================================================================== */

/* ---------- invite dialog ---------- */
.st-inv-dialog__roles { display: flex; flex-direction: column; gap: 8px; }
.st-inv-dialog__rolehelp { display: flex; align-items: flex-start; gap: 8px; margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--st-text-dim); }
.st-inv-dialog__rolehelp .st-icon { flex: 0 0 auto; margin-top: 2px; color: var(--st-lavender); }
.st-inv-dialog__fixed { margin: 0; font-size: 13.5px; font-weight: 600; }
.st-inv-dialog__error:empty { display: none; }
.st-inv-dialog__error { margin-top: 4px; }

/* ---------- invite rows ---------- */
.st-inv-list { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.st-inv-list[hidden] { display: none; }
.st-inv-list__title { margin: 4px 0 0; font-size: 12.5px; font-weight: 600; color: var(--st-text-dim); }
.st-inv-list__note { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 12.5px; color: var(--st-text-muted); }
.st-inv-list__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--st-border); border-radius: var(--st-r-12); background: var(--st-bg-elev); }
.st-inv-list__earlier > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--st-text-muted); padding: 4px 0; }
.st-inv-list__earlier > summary:hover { color: var(--st-text-dim); }
.st-inv-list__earlier[open] > summary { margin-bottom: 8px; }

/* In a narrow column (the stand drawer, My stand) the chip and the actions
   wrap under the address instead of squeezing it. */
.st-inv-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; min-height: 56px; padding: 8px 8px 8px 12px; min-width: 0; }
.st-inv-row + .st-inv-row { border-top: 1px solid var(--st-border); }
.st-inv-row__icon {
  width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  color: var(--st-amber); background: rgba(251, 191, 36, 0.1); border: 1px dashed rgba(251, 191, 36, 0.45);
}
.st-inv-row.is-accepted .st-inv-row__icon { color: var(--st-green); background: rgba(52, 211, 153, 0.1); border-style: solid; border-color: rgba(52, 211, 153, 0.35); }
.st-inv-row.is-revoked .st-inv-row__icon, .st-inv-row.is-expired .st-inv-row__icon { color: var(--st-text-muted); background: rgba(255, 255, 255, 0.04); border-color: var(--st-border-strong); }
.st-inv-row__text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.35; }
.st-inv-row__email { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-inv-row__meta { font-size: 12.5px; line-height: 1.4; color: var(--st-text-muted); overflow-wrap: anywhere; }
.st-inv-row__actions { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; margin-left: auto; }
.st-inv-row__revoke:hover { color: var(--st-red-text); }
.st-inv-row > .st-badge { flex: 0 0 auto; }
.st-inv-row__text + .st-badge { margin-left: auto; }

/* ---------- Invites for you ---------- */
.st-myinv { border-color: rgba(124, 92, 255, 0.35); background: linear-gradient(180deg, rgba(109, 92, 255, 0.08), rgba(109, 92, 255, 0) 70%), var(--st-bg-card); }
.st-myinv[hidden] { display: none; }
.st-myinv .st-card__title { display: flex; align-items: center; gap: 8px; }
.st-myinv .st-card__title .st-icon { color: var(--st-lavender); }
.st-myinv .st-card__body { padding: 12px 20px 16px; }
.st-myinv__rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--st-border); border-radius: var(--st-r-12); background: var(--st-bg-elev); }
.st-myinv__row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 10px 10px 12px; min-width: 0; }
.st-myinv__row + .st-myinv__row { border-top: 1px solid var(--st-border); }
.st-myinv__icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border-radius: var(--st-r-10); color: var(--st-lavender); background: rgba(109, 92, 255, 0.14); }
.st-myinv__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.35; }
.st-myinv__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-myinv__event { font-weight: 400; color: var(--st-text-dim); }
.st-myinv__meta { font-size: 12.5px; color: var(--st-text-muted); }

/* ---------- My stand ---------- */
.st-mystand__picker { display: flex; flex-direction: column; gap: 8px; }
.st-mystand__picker[hidden] { display: none; }
.st-mystand__picker-label { font-size: 12.5px; font-weight: 600; color: var(--st-text-muted); }
.st-mystand__intro { display: flex; align-items: flex-start; gap: 8px; margin: -4px 0 0; font-size: 13px; line-height: 1.5; color: var(--st-text-muted); }
.st-mystand__intro[hidden] { display: none; }
.st-mystand__intro .st-icon { flex: 0 0 auto; margin-top: 2px; }
.st-mystand__grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
/* Your spot: the venue map framed on the stand's spot (ui/spot-lot-map.js), first on the page. */
.st-mystand__spotcard[hidden] { display: none; }
.st-mystand__spotmap { overflow: hidden; border-radius: var(--st-r-10); border: 1px solid var(--st-border); }
.st-mystand__spotmap .st-spot-map { height: 300px; min-height: 0; }
.st-mystand__grid[hidden] { display: none; }
.st-mystand__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.st-mystand__stats .st-stat { padding: 12px 14px; background: var(--st-bg-elev); }
.st-mystand__stats .st-stat[hidden] { display: none; }
.st-mystand__stats .st-stat__value { font-size: 24px; }
.st-mystand__note { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--st-text-muted); }
.st-mystand__activities, .st-mystand__team { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-mystand__removed > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--st-text-muted); padding: 4px 0; }
.st-mystand__removed[open] > summary { margin-bottom: 6px; }
.st-mystand__removed .st-vdrawer__rows { margin-top: 8px; }
.st-mystand__muted { margin: 0; font-size: 12.5px; color: var(--st-text-muted); }

.st-mystand__stand { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.st-mystand__ident { display: flex; align-items: center; gap: 14px; min-width: 0; }
.st-mystand__identtext { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-mystand__name { margin: 0; font-size: 16px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mystand__desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--st-text-dim); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.st-mystand__desc.is-empty { color: var(--st-text-muted); font-style: italic; }
.st-mystand__links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.st-mystand__links .st-link { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mystand__reach { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; color: var(--st-text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-mystand__reach .st-icon { flex: 0 0 auto; color: var(--st-text-muted); }
/* The stand's offer (B9), the way the card in the app sets it apart. */
.st-mystand__offer {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--st-r-10);
  border: 1px dashed rgba(251, 191, 36, 0.5); background: rgba(251, 191, 36, 0.06);
}
.st-mystand__offer > .st-icon { flex: 0 0 auto; margin-top: 1px; color: var(--st-amber); }
.st-mystand__offer-title { font-weight: 600; font-size: 13.5px; }
.st-mystand__offer-details { margin-top: 2px; font-size: 13px; line-height: 1.5; color: var(--st-text-dim); }
.st-mystand__offer-code { margin-top: 4px; font-size: 12.5px; color: var(--st-text-muted); }
.st-mystand__offer-code code { font-family: var(--st-mono); font-weight: 600; letter-spacing: 0.06em; color: var(--st-text); }
.st-mystand__photos { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.st-mystand__photos img { width: 64px; height: 48px; object-fit: cover; border-radius: var(--st-r-8); border: 1px solid var(--st-border); background: var(--st-bg-elev); }
.st-mystand__count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--st-text-muted); font-variant-numeric: tabular-nums; }
.st-mystand__line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 10px 12px; border: 1px solid var(--st-border); border-radius: var(--st-r-12); background: var(--st-bg-elev); font-size: 13px; color: var(--st-text-dim); }
.st-mystand__line > span { flex: 1 1 180px; min-width: 0; line-height: 1.45; }
.st-mystand__line .st-icon { flex: 0 0 auto; color: var(--st-text-muted); }
.st-mystand__line .st-icon.is-ok { color: var(--st-green); }
.st-mystand__line .st-icon.is-warn { color: var(--st-amber); }

/* ---------- accept page, sign-in and the profile gate ---------- */
.st-invite-card { max-width: 520px; }
.st-invite-card .st-gate__body { display: flex; flex-direction: column; gap: 8px; }
.st-invite-card .st-gate__body .st-prose { margin: 0; }
.st-signin__invite, .st-gate__invite {
  display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--st-r-10); text-align: left;
  font-size: 13px; line-height: 1.5; color: var(--st-text); background: rgba(109, 92, 255, 0.12); border: 1px solid rgba(124, 92, 255, 0.4);
}
.st-signin__invite .st-icon, .st-gate__invite .st-icon { flex: 0 0 auto; margin-top: 2px; color: var(--st-lavender); }
.st-signin__invite-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--st-text-dim); }

/* ---------- Team page: open invites ---------- */
.st-team-invites { display: flex; flex-direction: column; gap: 8px; }

@media (max-width: 1100px) {
  .st-mystand__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .st-mystand__stats { grid-template-columns: minmax(0, 1fr); }
  .st-mystand__spotmap .st-spot-map { height: 260px; }
  .st-myinv__row { flex-wrap: wrap; }
  .st-myinv__text { flex-basis: calc(100% - 60px); }
}
