/* =========================================================================
   listas.css — listas institucionais (Editais, Licitações, Trabalhe conosco,
   Credenciamento). Modelo A do redesenho: tabela de leitura com alternador
   Tabela/Cards; no celular a tabela vira lista automaticamente.
   Prefixo lst-. Tokens em site-base.css.
   ========================================================================= */

.lst { padding: 24px 0 56px; font-family: var(--pub-font); }

/* ---------- Barra: situação + busca + filtro + alternador ---------- */
.lst-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.lst-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: #eef2f7; border-radius: 999px; padding: 4px; }
.lst-seg a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: #40516a; text-decoration: none; white-space: nowrap; }
.lst-seg a:hover { color: var(--pub-blue); }
.lst-seg a.is-on { background: #fff; color: var(--pub-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }
.lst-seg a small { font-size: 12px; color: var(--pub-muted); font-weight: 600; }
.lst-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lst-search { position: relative; }
.lst-search input { width: 300px; max-width: 100%; height: 44px; border: 1.5px solid #cdd8e6; border-radius: 999px; padding: 0 44px 0 42px; font-size: 15px; color: var(--pub-ink); background: #fff; }
.lst-search input:focus { outline: none; border-color: var(--pub-blue); box-shadow: 0 0 0 3px rgba(0, 76, 153, .15); }
.lst-search .fa-magnifying-glass { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--pub-muted); pointer-events: none; }
.lst-search button { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--pub-blue-grad); color: #fff; cursor: pointer; }
.lst-select { height: 44px; border: 1.5px solid #cdd8e6; border-radius: 999px; padding: 0 38px 0 16px; font-size: 14.5px; color: var(--pub-ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16'%3E%3Cpath fill='%235b6b80' d='M1.6 5.1a.75.75 0 0 1 1.06 0L8 10.4l5.34-5.3a.75.75 0 1 1 1.06 1.06l-5.87 5.86a.75.75 0 0 1-1.06 0L1.6 6.16a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E") no-repeat right 14px center; appearance: none; max-width: 100%; }
.lst-clear { font-size: 14px; color: var(--pub-blue); text-decoration: none; padding: 0 6px; }
.lst-clear:hover { text-decoration: underline; }

/* Alternador Tabela/Cards (partial _ViewModeToggle) */
.lst-toggle { display: inline-flex; background: #eef2f7; border-radius: 999px; padding: 4px; gap: 2px; }
.lst-toggle a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: #40516a; text-decoration: none; }
.lst-toggle a.is-on { background: #fff; color: var(--pub-ink); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); }

.lst-count { font-size: 14px; color: var(--pub-muted); margin: 0 0 8px; }

/* ---------- Tabela de leitura ---------- */
.lst-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.lst-table th { text-align: left; font: 600 12px/1.2 var(--pub-font); letter-spacing: .06em; text-transform: uppercase; color: var(--pub-muted); padding: 10px 12px; border-bottom: 1.5px solid var(--pub-ink); white-space: nowrap; }
.lst-table td { padding: 16px 12px; border-bottom: 1px solid var(--pub-line-soft); vertical-align: top; color: var(--pub-text); }
.lst-table tbody tr { position: relative; transition: background .12s; }
.lst-table tbody tr:hover { background: #f7f9fc; }
.lst-num { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: 13.5px; font-weight: 600; color: var(--pub-ink); white-space: nowrap; }
.lst-obj a { display: block; font-size: 15.5px; font-weight: 600; color: var(--pub-ink); line-height: 1.38; text-decoration: none; }
/* A linha inteira é o link: o ::after do link estica sobre o <tr> */
.lst-obj a::after { content: ""; position: absolute; inset: 0; }
.lst-table tbody tr:hover .lst-obj a { color: var(--pub-blue); }
.lst-obj a:focus-visible { outline: none; }
.lst-table tbody tr:focus-within { outline: 2px solid var(--pub-blue); outline-offset: -2px; }
.lst-obj small { display: block; font-size: 13px; color: var(--pub-muted); margin-top: 3px; }
.lst-date { white-space: nowrap; font-variant-numeric: tabular-nums; }
.lst-go { color: #9fb0c6; font-size: 18px; text-align: right; width: 28px; }
.lst-tag { display: inline-block; border-radius: 6px; font: 700 10.5px/1.3 var(--pub-font); letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; background: #eef2f7; color: #40516a; margin-top: 6px; }
.lst-tag--blue { background: #e6effe; color: #1d4ed8; }
.lst-tag--ext { background: #eef2f7; color: #40516a; }

/* Situação: ponto + texto (forma além da cor) */
.lst-st { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.lst-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.lst-st--aberto { color: #15803d; }
.lst-st--andamento { color: #a16207; }
.lst-st--finalizado { color: #64748b; }
.lst-st--suspenso { color: #b91c1c; }

/* ---------- Cards ---------- */
.lst-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lst-card { position: relative; display: flex; flex-direction: column; gap: 10px; background: #fff; border: 1px solid var(--pub-line); border-radius: 16px; padding: 20px 22px; transition: transform .15s ease, box-shadow .15s ease; }
.lst-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 76, 153, .12); }
.lst-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--pub-muted); }
.lst-card h3 { font: 700 17px/1.36 var(--pub-font-display); color: var(--pub-ink); margin: 0; }
.lst-card h3 a { color: inherit; text-decoration: none; }
.lst-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 16px; }
.lst-card:hover h3 { color: var(--pub-blue); }
.lst-card__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13.5px; color: var(--pub-muted); }
.lst-card__meta span { display: inline-flex; align-items: center; gap: 6px; }
.lst-card__foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px dashed #d5deea; font-size: 13.5px; }
.lst-card__foot b { color: var(--pub-blue); font-weight: 600; }

/* ---------- Rodapé da lista e paginação ---------- */
.lst-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; font-size: 14px; color: var(--pub-muted); }
.lst-foot select { height: 36px; border: 1.5px solid #cdd8e6; border-radius: 999px; padding: 0 30px 0 12px; font-size: 14px; background: #fff; }
.lst-pag { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.lst-pag a, .lst-pag span { min-width: 38px; height: 38px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--pub-line); color: var(--pub-ink); text-decoration: none; font-size: 14px; }
.lst-pag a:hover { border-color: var(--pub-blue); color: var(--pub-blue); }
.lst-pag .is-on { background: var(--pub-blue); border-color: var(--pub-blue); color: #fff; }

.lst-empty { text-align: center; padding: 56px 20px; color: var(--pub-muted); border: 1px dashed var(--pub-line); border-radius: 16px; }
.lst-empty i { font-size: 36px; color: #cbd5e1; margin-bottom: 12px; }
.lst-empty p { margin: 0 0 4px; font-size: 15.5px; color: var(--pub-text); }

.lst-aside { margin-top: 36px; padding: 22px 24px; background: var(--pub-tint); border-radius: 16px; }
.lst-aside h2 { font: 800 18px/1.2 var(--pub-font-display); margin: 0 0 12px; color: var(--pub-ink); }
.lst-aside ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; }
.lst-aside a { color: var(--pub-blue); font-size: 14.5px; text-decoration: none; display: inline-flex; gap: 8px; align-items: baseline; }
.lst-aside a:hover { text-decoration: underline; }

/* ---------- Celular: tabela vira lista (independe do alternador) ---------- */
@media (max-width: 767px) {
    .lst { padding: 16px 0 40px; }
    .lst-bar { flex-direction: column; align-items: stretch; }
    .lst-seg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; border-radius: 14px; }
    .lst-seg::-webkit-scrollbar { display: none; }
    .lst-form { flex-direction: column; align-items: stretch; }
    .lst-search input, .lst-select { width: 100%; }
    .lst-toggle { display: none; }
    .lst-table, .lst-table tbody, .lst-table tr, .lst-table td { display: block; width: 100%; }
    .lst-table thead { display: none; }
    .lst-table tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--pub-line-soft); }
    .lst-table td { padding: 0; border: 0; }
    .lst-table td.lst-num { grid-column: 1; grid-row: 1; }
    .lst-table td.lst-st-cell { grid-column: 2; grid-row: 1; text-align: right; }
    .lst-table td.lst-obj { grid-column: 1 / -1; }
    .lst-table td.lst-date { grid-column: 1 / -1; font-size: 13px; color: var(--pub-muted); }
    .lst-table td.lst-date::before { content: attr(data-label) " "; }
    .lst-table td.lst-go, .lst-table td.lst-hide-m { display: none; }
    .lst-grid { grid-template-columns: 1fr; gap: 12px; }
    .lst-card { padding: 16px; }
    .lst-foot { flex-direction: column; align-items: flex-start; }
}

/* ---------- Trabalhe conosco: etapas e perguntas ---------- */
.ts-etapas { padding-top: 30px; }
.ts-etapas h2, .ts-faq h2 { font: 800 20px/1.2 var(--pub-font-display); color: var(--pub-ink); margin: 0 0 16px; }
.ts-etapas ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); counter-reset: ts; }
.ts-etapas li { counter-increment: ts; position: relative; padding: 0 22px 0 0; }
.ts-etapas li::before { content: counter(ts); display: flex; width: 34px; height: 34px; border-radius: 50%; background: var(--pub-blue); color: #fff; font: 800 15px/1 var(--pub-font-display); align-items: center; justify-content: center; margin-bottom: 12px; position: relative; z-index: 1; }
.ts-etapas li::after { content: ""; position: absolute; top: 17px; left: 40px; right: 6px; height: 2px; background: #d5deea; }
.ts-etapas li:last-child::after { display: none; }
.ts-etapas b { display: block; font-size: 15.5px; color: var(--pub-ink); margin-bottom: 4px; }
.ts-etapas span { font-size: 14px; color: var(--pub-muted); line-height: 1.5; }
.ts-faq { padding-bottom: 20px; }
.ts-faq > div { display: grid; gap: 10px; max-width: 860px; }
.ts-faq details { border: 1px solid var(--pub-line); border-radius: 14px; padding: 0 18px; background: #fff; }
.ts-faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 600; color: var(--pub-ink); position: relative; }
.ts-faq summary::-webkit-details-marker { display: none; }
.ts-faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 20px; color: var(--pub-blue); }
.ts-faq details[open] summary::after { content: "−"; }
.ts-faq p { margin: 0 0 16px; color: var(--pub-text); font-size: 15px; line-height: 1.6; }
@media (max-width: 767px) {
    .ts-etapas { padding-top: 22px; }
    .ts-etapas ol { grid-template-columns: 1fr; gap: 14px; }
    .ts-etapas li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; padding: 0; }
    .ts-etapas li::before { grid-row: span 2; margin: 0; }
    .ts-etapas li::after { display: none; }
}
