/* val-team-finder.css — Team finder (/valorant/team-finder). Tarjetas, filtros, formulario y "Your posts". */
.tf-main { box-sizing: border-box; width: 100%; max-width: var(--page-max, 1440px); margin: 0 auto; padding: 28px var(--sp-9, 28px) 64px; }
.tf-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.tf-hd h1 { margin: 4px 0 6px; font-size: clamp(24px, 3vw, 32px); letter-spacing: -.02em; }
.tf-lead { margin: 0; color: var(--text-gray); max-width: 640px; }
.tf-hd-btns { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tf-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: #ff4655; color: #fff; font-size: 11px; font-weight: 700; }

/* "New post" del capitán: como yo o como equipo */
.tf-post-as { position: relative; }
.tf-post-as summary { list-style: none; cursor: pointer; }
.tf-post-as summary::-webkit-details-marker { display: none; }
.tf-post-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 270px; padding: 6px; border: 1px solid var(--border-subtle); border-radius: 12px; background: #1a1a1d; box-shadow: 0 12px 32px rgba(0,0,0,.45); }
.tf-post-menu a { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border-radius: 8px; color: #fff; text-decoration: none; }
.tf-post-menu a:hover { background: var(--bg-hover); }
.tf-post-menu svg { width: 18px; height: 18px; margin-top: 2px; color: #ff4655; flex: none; }
.tf-post-menu small { display: block; color: var(--text-gray); font-size: 12px; }

/* Lista: filtros a la izquierda, tarjetas a la derecha */
.tf-lay { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.tf-side { position: sticky; top: 76px; display: grid; gap: 14px; }
.tf-side .st-fld { margin: 0; }
.tf-clear { display: inline-flex; align-items: center; gap: 6px; color: var(--text-gray); font-size: 13px; text-decoration: none; }
.tf-clear:hover { color: #fff; }
.tf-clear svg { width: 14px; height: 14px; }
.tf-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 16px; border: 1px solid var(--border-subtle); border-radius: 11px; background: var(--bg-surface); }
.tf-tabs a { padding: 7px 14px; border-radius: 8px; color: var(--text-gray); font-size: 13px; font-weight: 600; text-decoration: none; }
.tf-tabs a span { opacity: .7; font-weight: 500; margin-left: 2px; }
.tf-tabs a:hover { color: #fff; }
.tf-tabs a.on { background: #ff4655; color: #fff; }
.tf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.tf-more { display: flex; align-items: center; gap: 12px; justify-content: center; margin-top: 20px; }

/* Tarjeta */
.tf-card { --tc: #ff4655; position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; overflow: hidden;
           border: 1px solid var(--border-subtle); border-radius: 14px; background: var(--bg-surface); }
.tf-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--tc); opacity: .9; }
.tf-card.is-team { --tc: #2fb3be; background: linear-gradient(180deg, color-mix(in srgb, var(--tc) 7%, transparent), transparent 55%), var(--bg-surface); }
.tf-card.is-mine { border-color: color-mix(in srgb, var(--tc) 40%, var(--border-subtle)); }
.tf-card header { display: flex; gap: 12px; align-items: center; min-width: 0; }
.tf-av { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #222226; color: #fff; font-weight: 700; font-size: 15px; }
.tf-av--team { background: var(--tc); color: #0b0b0b; letter-spacing: .02em; }
.tf-av-rank { width: 34px; height: 34px; }
.tf-who { min-width: 0; flex: 1; }
.tf-who a, .tf-who > span { color: #fff; text-decoration: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-who a:hover b { text-decoration: underline; }
.tf-who b { font-size: 15px; }
.tf-who small { display: block; color: var(--text-gray); font-size: 12px; }
.tf-tag { color: var(--text-gray); font-weight: 400; font-size: 13px; }
.tf-ok { align-self: flex-start; display: inline-flex; align-items: center; gap: 3px; color: #45d483; font-size: 11px; font-weight: 600; white-space: nowrap; }
.tf-ok svg { width: 12px; height: 12px; }
.tf-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tf-tags span { padding: 3px 9px; border-radius: 7px; background: rgba(255,255,255,.06); color: #cfcfd6; font-size: 12px; }
.tf-tags span.is-role { background: rgba(255,70,85,.12); color: #ff7a85; }
.tf-stats { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 8px; padding: 10px 12px; border-radius: 10px; background: rgba(0,0,0,.25); }
.tf-stats small { display: block; color: var(--text-muted, #6f6f78); font-size: 11px; }
.tf-stats b { display: flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.tf-rank { width: 20px; height: 20px; }
.tf-agents { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tf-ag { width: 28px; height: 28px; border-radius: 7px; background: #222226; flex: none; }
.tf-agents span { color: var(--text-gray); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tf-note { margin: 0; color: #cfcfd6; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.tf-meta { margin: 0; color: var(--text-gray); font-size: 12px; }
.tf-card .tf-act { display: flex; gap: 8px; margin-top: auto; align-items: center; }
.tf-card .tf-act .st-btn { flex: 1; justify-content: center; }
.tf-card .tf-act .tf-need { flex: 1; min-width: 0; height: 38px; }
.tf-card .tf-act .tf-flag { flex: none; }
.tf-card .pm-err { margin: 0; }

/* Puestos del equipo: 5 titulares | 2 suplentes */
.tf-slots { display: flex; gap: 5px; align-items: stretch; }
.tf-slots span { flex: 1; min-width: 0; display: grid; place-items: center; height: 34px; padding: 0 2px; border-radius: 8px; background: rgba(255,255,255,.04);
                 color: var(--text-gray); font-size: 10.5px; font-weight: 600; text-align: center; line-height: 1.1; overflow: hidden; }
.tf-slots span.is-on { background: color-mix(in srgb, var(--tc) 16%, transparent); color: var(--tc); }
.tf-slots span.is-on svg { width: 14px; height: 14px; }
.tf-slots span.is-need { border: 1px dashed #ff4655; background: rgba(255,70,85,.06); color: #ff7a85; }
.tf-slots span.is-sub { flex: .8; }
.tf-slots small { display: block; font-size: 9px; font-weight: 500; opacity: .75; }
.tf-slots-sep { width: 1px; margin: 4px 2px; background: var(--border-subtle); }

/* Vacío */
.tf-empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tf-empty b { font-size: 15px; }
.tf-empty span { color: var(--text-gray); }
.tf-empty .st-btn { margin-top: 6px; }

/* Formulario */
.tf-form { max-width: 760px; display: grid; gap: 18px; }
.tf-form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; }
.tf-form legend { padding: 0; margin-bottom: 8px; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-gray); }
.tf-form legend small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: .8; margin-left: 4px; }
.tf-form .ct-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tf-form .pm-hint { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.tf-form .pm-hint svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: #45d483; }
.tf-form-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.tf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-chip input { position: absolute; opacity: 0; pointer-events: none; }
.tf-chip span { display: inline-block; padding: 8px 14px; border: 1px solid var(--border-subtle); border-radius: 9px; background: var(--bg-elevated); color: #cfcfd6; font-size: 13px; cursor: pointer; user-select: none; }
.tf-chip span:hover { border-color: var(--border-hover, #3a3a42); }
.tf-chip input:checked + span { border-color: #ff4655; background: rgba(255,70,85,.12); color: #fff; }
.tf-chip input:focus-visible + span { outline: 2px solid #ff4655; outline-offset: 2px; }
.tf-needs { display: grid; gap: 8px; }
.tf-need-row { display: grid; grid-template-columns: minmax(0, 220px) auto auto; gap: 8px; align-items: center; justify-content: start; }
#tfAddNeed { justify-self: start; }

/* Your posts */
.tf-mine { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.tf-mine section { display: grid; gap: 12px; }
.tf-mine h2 { margin: 0; font: 600 12px var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-gray); }
.tf-mine-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tf-reqs h3 { margin: 0 0 10px; font-size: 15px; }
.tf-req { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border-subtle); }
.tf-req .tf-av { width: 40px; height: 40px; }
.tf-req .tf-av-rank { width: 28px; height: 28px; }
.tf-req b a { color: #fff; text-decoration: none; }
.tf-req small { display: block; color: var(--text-gray); font-size: 12px; }

/* Reportar */
.tf-flag-dlg { padding: 0; border: 0; background: none; color: inherit; max-width: 380px; width: calc(100% - 32px); }
.tf-flag-dlg::backdrop { background: rgba(0,0,0,.6); }
.tf-flag-dlg .pm-card { display: grid; gap: 10px; }
.tf-radio { display: flex; gap: 8px; align-items: center; font-size: 14px; }

@media (max-width: 980px) {
    .tf-lay { grid-template-columns: 1fr; }
    .tf-side { position: static; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .tf-mine { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .tf-main { padding: 20px 14px 48px; }
    .tf-hd-btns { width: 100%; }
    .tf-hd-btns > * { flex: 1; }
    .tf-hd-btns .st-btn { justify-content: center; width: 100%; }
    .tf-post-menu { left: 0; right: auto; }
    .tf-side { grid-template-columns: 1fr 1fr; }
    .tf-form .ct-two { grid-template-columns: 1fr; }
    .tf-req { grid-template-columns: auto minmax(0, 1fr); }
    .tf-req .st-btn { grid-column: span 1; }
}

/* Filtros en una barra horizontal encima de las tarjetas (antes columna a la izquierda) */
.tf-lay { grid-template-columns: minmax(0, 1fr); gap: 16px; }
.tf-side { position: static; grid-template-columns: repeat(6, minmax(0, 1fr)) auto; align-items: end; gap: 10px; padding: 12px 14px; }
.tf-side .st-fld label { font-size: 12px; }
.tf-side .tf-clear { height: 36px; }
@media (max-width: 1100px) { .tf-side { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .tf-side { grid-template-columns: 1fr 1fr; } }
