/* ui-texting.css (#5950 / #6825 s4texting, UNIVERSAL): the texting pieces (clubreport, textclubs, clubcompose). Theme variables only,
   so each app's own design decides the look; phone-first (one column), two to three columns from 640px. */
.tx { display: flex; flex-direction: column; gap: 14px; font-family: var(--font, inherit); color: var(--text); }
.tx h3 { margin: 0; font-family: var(--hfont, inherit); font-size: 18px; color: var(--text); }
.tx.is-busy { opacity: .6; transition: opacity .15s; }
.tx-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tx-chips { display: inline-flex; gap: 6px; }
.tx-chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; min-height: 34px; }
.tx-chip.is-on { background: var(--primary); border-color: var(--primary); color: #fff; }
.tx-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .tx-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tx-tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tx-tile span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tx-tile b { font-size: 26px; line-height: 1.15; color: var(--text); font-family: var(--hfont, inherit); }
.tx-tile small { font-size: 12px; color: var(--muted); }
.tx-tile.tx-members b, .tx-tile.tx-sent b { color: var(--primary); }
.tx-tile.tx-failed.is-bad b { color: var(--danger-ink, #b42318); }
.tx-row .u-button:disabled { opacity: .45; cursor: not-allowed; }
.tx-empty { background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius, 12px); padding: 22px; text-align: center; color: var(--muted); }
.tx-empty b { display: block; color: var(--text); margin-bottom: 4px; }
.tx-empty p { margin: 0; }
.tx-club-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
@media (min-width: 640px) { .tx-club-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tx-club { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius, 12px); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.tx-club.is-off { opacity: .72; }
.tx-club header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tx-club header b { font-size: 16px; display: block; }
.tx-club header small { color: var(--muted); font-size: 12.5px; }
.tx-club code { background: var(--bg); border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; font-size: 12px; }
.tx-club-nums { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.tx-club-nums b { color: var(--text); font-size: 15px; }
.tx-club-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.tx-club-acts .u-button { min-height: 40px; }
.tx-club-more { border-top: 1px solid var(--border); padding-top: 10px; }
.tx-qr { width: 168px; height: 168px; image-rendering: pixelated; display: block; background: #fff; padding: 6px; border: 1px solid var(--border); border-radius: 8px; }
.tx-sends { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tx-sends li p { margin: 0 0 2px; font-size: 14px; }
.tx-sends li small { color: var(--muted); font-size: 12px; }
.tx-switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.tx-switch input { opacity: 0; width: 100%; height: 100%; position: absolute; margin: 0; cursor: pointer; z-index: 1; }
.tx-switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--border); transition: background .15s; }
.tx-switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.tx-switch input:checked + span { background: var(--ok, var(--primary)); }
.tx-switch input:checked + span::after { transform: translateX(18px); }
.tx-switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.tx-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.tx-field span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tx-field select, .tx-field textarea, .tx-field input { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: calc(var(--radius, 12px) * .6); padding: 10px 12px; font: inherit; font-size: 16px; min-height: 44px; width: 100%; box-sizing: border-box; }
.tx-field textarea { resize: vertical; }
.tx-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.tx-row .u-button { min-height: 44px; }
.tx-preview:empty { display: none; }
.tx-bubble { background: var(--bg); border: 1px solid var(--border); border-radius: 16px 16px 16px 4px; padding: 10px 12px; max-width: 420px; font-size: 14.5px; line-height: 1.45; }
.tx-note { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); }
.tx-warn { display: flex; gap: 6px; align-items: flex-start; margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: color-mix(in srgb, var(--warn, #b54708) 12%, transparent); color: var(--warn, #b54708); font-size: 13px; }
.tx-warn svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.tx-row .tx-field { flex: 1 1 240px; }
