/* team-find-requests.css - Find a teammate: the Requests view, the request dialog and the badges
 * (public/js/team-find-requests.js). Values from the feature mockup, on the site's tokens (v2.css, lmu-section.css). */
.tfr, .tfr-dlg { --tfr-good: var(--dx-good, #3ddc84); --tfr-crit: var(--crit, #ff5470); --tfr-warn: var(--warn, #ffb020); --tfr-bg2: var(--bg-2, var(--panel-2)); }
.tfr .tfr-muted, .tfr-dlg .tfr-muted { color: var(--text-3); }
.tfr .tfr-small, .tfr-dlg .tfr-small { font-size: 12px; }

/* Sub-tab rail of the preview shim, and the counts. */
.tfr-subrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.tfr-subrow .tfr-hint { margin: 0 0 16px; color: var(--text-3); font-size: 12px; }
.tfr-cnt-badge { display: inline-block; min-width: 18px; margin-left: 2px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--bg, #000); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.lmu-subtabs .lmu-tab-badge, .tabs .lmu-tab-badge { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--bg, #000); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; font-variant-numeric: tabular-nums; }

/* Two columns, Inbox and Sent. */
.tfr-cols { align-items: start; }   /* .sl-grid (v2.css): Inbox and Sent are .c6 */
.tfr-col { min-width: 0; }
.tfr-col h2 { margin: 0 0 8px; font: 600 20px/1.2 var(--v2-font-display, inherit); color: var(--text-hi); border: 0; padding: 0; }
.tfr-col h2 small { margin-left: 8px; font: 500 12px/1 inherit; font-family: inherit; color: var(--text-3); }
.tfr-req { display: grid; gap: 8px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--panel); margin-bottom: 8px; }
.tfr-req > * { min-width: 0; }   /* grid items: a long name never widens the card */
.tfr-head { display: flex; align-items: center; gap: 10px; }
.tfr-av { flex: none; width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--surface-3); color: var(--text-hi); font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.tfr-av.team { border-radius: 6px; }
.tfr-head .people-av, .tfr-head img { flex: none; border-radius: 50%; }
.tfr-who { flex: 1; min-width: 0; }
.tfr-name { display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 650; color: var(--text-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfr-name .tfr-muted { font-weight: 500; }
.tfr-sub { color: var(--text-3); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tfr-msg { margin: 0; padding: 8px 10px; border-left: 2px solid var(--line-3); color: var(--text-2); font-size: 13px; line-height: 1.45; background: var(--tfr-bg2); border-radius: 0 3px 3px 0; overflow-wrap: anywhere; }
.tfr-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; color: var(--text-3); font-size: 12px; }
.tfr-acts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tfr-acts .sp, .tfr-reveal .sp { flex: 1; }
/* #728: the Flagged row (a driver who misses the team's requirements), the inbox kind headings, the race select. */
.tfr-flag { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; padding: 6px 10px; border-left: 2px solid var(--warn, #ffb020); border-radius: 0 4px 4px 0; background: color-mix(in srgb, var(--warn, #ffb020) 8%, var(--bg-2, var(--panel))); color: var(--text-2); font-size: 12px; line-height: 1.4; }
.tfr-kind { margin: 4px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tfr-kind small { margin-left: 6px; font-weight: 600; letter-spacing: 0; }
.tfr-dlg select.tfr-sel { display: block; width: 100%; box-sizing: border-box; height: 32px; margin-top: 6px; padding: 0 10px; border: 1px solid var(--line-3); border-radius: 6px; background: var(--tfr-bg2, var(--bg-2)); color: var(--text); font: inherit; font-size: 13px; }

/* Status pills. */
.tfr-pill { display: inline-flex; align-items: center; gap: 5px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.tfr-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tfr-pill.wait { color: var(--tfr-warn); background: var(--warn-dim, color-mix(in srgb, var(--tfr-warn) 14%, var(--panel))); }
.tfr-pill.ok { color: var(--tfr-good); background: color-mix(in srgb, var(--tfr-good) 14%, var(--panel)); }
.tfr-pill.no { color: var(--text-3); }

/* The reveal box: both handles, only after both sides accepted. */
.tfr-reveal { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 8px 10px; border: 1px dashed color-mix(in srgb, var(--tfr-good) 45%, var(--line-3)); border-radius: 6px; font-size: 13px; color: var(--text-2); }
.tfr-reveal code { font: 600 13px/1 ui-monospace, Consolas, monospace; color: var(--text-hi); }

/* Match ring (when the server sends a match summary). */
.tfr-score { flex: none; display: grid; justify-items: center; gap: 2px; width: 58px; }
.tfr-score .ring { --p: 0; --sc: var(--text-3); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--sc) calc(var(--p) * 1%), var(--line-2) 0); }
.tfr-score .ring span { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--text-hi); font: 700 15px/1 var(--v2-font-display, inherit); font-variant-numeric: tabular-nums; }
.tfr-score small { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.tfr-score.s-strong .ring { --sc: var(--tfr-good); } .tfr-score.s-strong small { color: var(--tfr-good); }
.tfr-score.s-good .ring { --sc: var(--accent-soft, var(--accent)); }
.tfr-score.s-fair .ring { --sc: var(--text-2); }
.tfr-score.s-weak .ring { --sc: var(--line-3); }

/* Buttons, the mockup's three weights. */
.tfr .tfr-btn-q, .tfr .tfr-btn-o, .tfr .tfr-btn-p, .tfr-dlg .tfr-btn-q, .tfr-dlg .tfr-btn-o, .tfr-dlg .tfr-btn-p {
    height: 30px; min-height: 0; margin: 0; padding: 0 12px; border-radius: 6px; font-size: 13px; font-weight: 600; line-height: 1; cursor: pointer; box-shadow: none; transform: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.tfr .tfr-btn-q, .tfr-dlg .tfr-btn-q { padding: 0 10px; border: 1px solid transparent; background: none; color: var(--text-2); }
.tfr .tfr-btn-q:hover, .tfr-dlg .tfr-btn-q:hover { color: var(--text-hi); background: var(--v2-hover, var(--surface-2)); }
.tfr .tfr-btn-o, .tfr-dlg .tfr-btn-o { border: 1px solid var(--line-3); background: var(--tfr-bg2); color: var(--text-hi); }
.tfr .tfr-btn-o:hover, .tfr-dlg .tfr-btn-o:hover { border-color: var(--accent); }
.tfr .tfr-btn-p, .tfr-dlg .tfr-btn-p { padding: 0 14px; border: 1px solid var(--accent); background: var(--accent); color: var(--bg, #000); }
.tfr .tfr-btn-p:hover, .tfr-dlg .tfr-btn-p:hover { background: var(--accent-soft, var(--accent)); border-color: var(--accent-soft, var(--accent)); }
.tfr button[disabled], .tfr-dlg button[disabled] { opacity: .55; cursor: default; }
.tfr .tfr-crit, .tfr-dlg .tfr-crit { color: var(--tfr-crit); }
.tfr-dlg .tfr-btn-o.tfr-crit { border-color: color-mix(in srgb, var(--tfr-crit) 45%, var(--line-3)); }

/* Request dialog: centered on desktop, bottom sheet on phones. */
.tfr-scrim { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .6); display: grid; place-items: center; padding: 16px; }
.tfr-dlg { width: min(100%, 520px); max-height: 90vh; overflow: auto; padding: 18px 20px; border: 1px solid var(--line-3); border-radius: 10px; background: var(--panel-2); color: var(--text); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); display: grid; gap: 12px; font-size: 14px; }
.tfr-dlg > * { min-width: 0; }
.tfr-dlg h2 { margin: 0; font: 600 20px/1.2 var(--v2-font-display, inherit); color: var(--text-hi); border: 0; padding: 0; }
.tfr-to { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--panel); font-size: 13px; }
.tfr-to .tfr-av { width: 30px; height: 30px; font-size: 11px; }
.tfr-to b { color: var(--text-hi); }
.tfr-dlg label.tfr-tg { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.tfr-dlg label.tfr-tg input { margin: 3px 0 0; accent-color: var(--accent); width: 15px; height: 15px; flex: none; }
.tfr-dlg label.tfr-tg b { color: var(--text-hi); font-weight: 600; }
.tfr-dlg label.tfr-block { display: block; }
.tfr-dlg [hidden] { display: none; }
.tfr-lbl { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.tfr-lbl small { font-weight: 500; letter-spacing: 0; text-transform: none; }
.tfr-dlg textarea.tfr-inp { display: block; width: 100%; box-sizing: border-box; min-height: 72px; margin-top: 6px; padding: 8px 10px; border: 1px solid var(--line-3); border-radius: 6px; background: var(--tfr-bg2); color: var(--text); font: inherit; font-size: 13px; line-height: 1.4; resize: vertical; }
.tfr-dlg textarea.tfr-inp:focus { outline: none; border-color: var(--accent); box-shadow: var(--v2-focus, 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent)); }
.tfr-reasons { display: grid; gap: 8px; }
.tfr-dacts { display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.tfr-dacts .tfr-cnt { margin-right: auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }
.tfr-fine { margin: 0; color: var(--text-3); font-size: 12px; line-height: 1.45; }

@media (max-width: 720px) {
    .tfr-subrow .tfr-hint { display: none; }
    .tfr-scrim { align-items: end; padding: 0; }
    .tfr-dlg { width: 100%; max-height: 88vh; border-radius: 14px 14px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: no-preference) {
    .tfr-dlg { animation: tfr-up .18s ease-out; }
    @keyframes tfr-up { from { transform: translateY(8px); opacity: 0; } }
}
