/* Telas públicas embutidas em iframe no site do cliente (IFrame/ListagemTitulos.aspx e DetalhesTitulo.aspx,
   master Public/Site1.Master) — visual do padrão das telas novas (Forms/Titulos/titulos.css), enxuto pra
   aproveitar o espaço pequeno do iframe. Tudo prefixado por #iframePage pra vencer Bootstrap/masterv2.css. */

:root {
    --border: #ccc;
    --text-primary: #1a1a18;
    --text-secondary: #666;
    --text-muted: #888;
    --font: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

#iframePage * {
    box-sizing: border-box;
}

#iframePage {
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-primary);
}

#iframePage .container-ftrustee {
    padding: 14px 20px;
}

#iframePage hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 12px 0;
}

/* ---- rodapé: no fim da página, e não fixo (o fixo cobria as linhas da grid no iframe baixo) ---- */
#iframePage footer {
    position: static;
    background: none;
    color: var(--text-muted);
    font-size: 11px;
    border-top: 1px solid var(--border);
    padding: 8px 16px;
}

/* ---- filtro e botões ---- */
#iframePage .form-filtro input[type=text],
#iframePage .form-filtro button,
#iframePage .form-filtro input[type=reset] {
    height: 28px;
    line-height: normal;
    padding: 0 10px;
    margin-bottom: 0;
    font-family: var(--font);
    font-size: 12px;
    color: var(--text-primary);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 0;
}

#iframePage .form-filtro button {
    font-weight: 600;
}

#iframePage .form-filtro button:hover,
#iframePage .form-filtro input[type=reset]:hover {
    background: #eee;
}

/* listagem: busca à esquerda e "resultados por página" à direita, numa linha só */
#iframePage .lista-topo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#iframePage .lista-topo .form-filtro,
#iframePage .lista-topo .form-filtro > div {
    margin: 0 !important;
}

#iframePage .lista-topo .dataTables_length {
    float: none;
    padding: 0;
}

#iframePage input:focus,
#iframePage select:focus,
#iframePage button:focus {
    outline: 1px solid var(--text-secondary);
    outline-offset: -1px;
}

/* ---- grid (DataTables) — mantém o visual da antiga (cabeçalho, zebrado e paginação padrão do
   DataTables, links azuis); só a fonte, a rolagem horizontal na tabela e o espaçamento mudam ---- */
#iframePage .table-wrap {
    clear: both; /* o "resultados por página" do DataTables é float:left */
    overflow-x: auto;
    margin: 6px 0;
}

#iframePage table.dataTable {
    margin: 0 !important;
    font-size: 12px;
}

#iframePage table.dataTable thead th {
    padding: 6px 8px;
}

#iframePage table.dataTable tbody td {
    padding: 5px 8px;
}

/* listagem: larguras fixas (definidas no columnDefs) e "..." no que não couber — sem rolagem horizontal;
   o texto inteiro fica no title da célula */
#iframePage #ativosTable {
    table-layout: fixed;
}

#iframePage #ativosTable thead th,
#iframePage #ativosTable tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#iframePage #ativosTable .link-detalhes {
    display: inline-flex;
    vertical-align: middle;
}

#iframePage .dataTables_wrapper .dataTables_length,
#iframePage .dataTables_wrapper .dataTables_info,
#iframePage .dataTables_wrapper .dataTables_paginate {
    font-size: 12px;
}

#iframePage .dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 2px 8px;
}

/* listagem: info, "© Fincs" e paginação numa linha só (o rodapé da master é movido pra .lista-copy) */
#iframePage .lista-rodape {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#iframePage .lista-rodape .dataTables_info,
#iframePage .lista-rodape .dataTables_paginate {
    float: none;
    padding: 0;
}

#iframePage .lista-rodape footer {
    border: 0;
    padding: 0;
}

#iframePage table.dataTable thead th {
    white-space: nowrap;
}

#iframePage table.dataTable tbody td {
    white-space: nowrap;
}

#iframePage .dataTables_wrapper {
    font-family: var(--font);
}

/* listagem: altura da tabela limitada à janela (o iframe do cliente é baixo) — a max-height é calculada
   no JS (ajustarAlturaTabela) pra busca, cabeçalho, paginação e rodapé ficarem à vista; só as linhas
   rolam. Cabeçalho preso no topo da área que rola. */
#iframePage #ativosTable_wrapper .table-wrap {
    overflow: auto;
}

#iframePage #ativosTable thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

/* Detalhes: coluna Data presa ao rolar pro lado (Histórico de PUs e de Pagamentos). Fundo branco pra não
   vazar o texto das outras colunas por baixo; o zebrado do DataTables é box-shadow inset, continua por cima */
#iframePage #tabelaPUS thead th:first-child,
#iframePage #tabelaPUS tbody td:first-child,
#iframePage #tabelaPagamentos thead th:first-child,
#iframePage #tabelaPagamentos tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    border-right: 1px solid #ddd;
}

/* ---- Detalhes: título, abas e características ---- */
#iframePage h2 {
    font-size: 20px;
    font-weight: 600 !important;
    font-variant: normal; /* Site.css põe small-caps no h2 */
    color: var(--text-primary);
    margin: 0;
}

/* flex: tira o espaço em branco entre os botões inline (o vão entre as abas) */
#iframePage .tab {
    display: flex;
    font-size: 13px;
}

#iframePage .tab button {
    padding: 8px 16px;
    font-family: var(--font);
    font-size: 13px;
    font-weight: normal;
    color: var(--text-secondary);
    background: #fff;
    border: 0;
    border-bottom: 1px solid var(--border);
    margin-right: 0;
    transition: none;
}

#iframePage .tab button:hover {
    background: #eee;
}

#iframePage .tab button.active {
    border: 1px solid var(--border);
    border-bottom: 0;
    font-weight: 600;
    color: var(--text-primary);
    background: #fff;
}

#iframePage .tab-content {
    font-size: 12px;
    padding: 12px 0 0;
    margin-bottom: 0;
}

#iframePage .caracteristicas {
    margin-top: 0;
}

#iframePage .caracteristicas .col {
    padding-top: 6px;
    padding-bottom: 6px;
}

#iframePage .caracteristicas small {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

/* Detalhes: "Exportar para Excel" na mesma linha do "resultados por página" (movido no JS) */
#iframePage .exportar-excel {
    font-size: 12px;
}
