
/*=========================================
  FHGV — Search & Table Design System
  Padrão visual: Fugulin
  Paleta: Verde #1c6c47 / #00b13f / cinza
=========================================*/

/* ---- Toolbar (busca + resultados por página) ---- */
.fhgv-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* ---- Barra de pesquisa ---- */
.searchFor {
    display: flex;
    align-items: center;
    height: 3rem;
    border-radius: 60px;
    background-color: #ffffff;
    position: relative;
    margin: 0;
    border: 2px solid #1c6c4730;
    color: #1c6c47;
    box-shadow: 0 2px 8px rgba(28, 108, 71, 0.07);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    flex: 1;
    max-width: 480px;
    min-width: 200px;
    overflow: hidden;
}

.searchFor:focus-within {
    border-color: #1c6c47;
    border-width: 2px;
    box-shadow: 0 2px 12px rgba(28, 108, 71, 0.15);
}

.searchFor.fhgv {
    background-color: white;
    opacity: 0.9;
}

.searchFor input[type="search"i],
.searchFor input {
    width: 100% !important;
    height: 100% !important;
    padding: 0 16px 0 45px !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 60px !important;
    font-family: "Outfit", sans-serif !important;
    color: #1c6c47 !important;
    font-size: 15px !important;
    box-sizing: border-box !important;
}

.searchFor input[type="search"i]::placeholder,
.searchFor input::placeholder {
    color: #1c6c4780 !important;
    opacity: 1 !important;
}

.searchFor input[type="search"i]:focus,
.searchFor input[type="search"i]:focus-visible,
.searchFor input:focus,
.searchFor input:focus-visible {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background-color: transparent !important;
}

input[type="search"]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    appearance: none;
    height: 0;
    width: 0;
    display: none;
}

.searchSimbol {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1c6c4780;
    font-size: 14px;
    pointer-events: none;
    transition: color 0.2s ease;
    z-index: 2;
}

.searchFor:focus-within .searchSimbol {
    color: #1c6c47;
}

/* ---- Containers ---- */
.fhgvContainer {
    height: fit-content;
    display: flex;
    flex: 1;
    flex-direction: column;
    border-radius: 18px;
    padding: 2rem;
    background-color: #ffffff;
    position: relative;
    font-family: "Outfit", sans-serif !important;
    margin: 2rem;
    box-shadow: 0 4px 24px rgba(28, 108, 71, 0.07), 0 1px 4px rgba(0,0,0,0.04);
}

.fhgvContainer-table {
    height: fit-content;
    display: flex;
    flex: 1;
    flex-direction: column;
    border-radius: 14px;
    background-color: #ffffff;
    position: relative;
    font-family: "Outfit", sans-serif !important;
    padding: 0;
    margin: 1rem 0;
    border: 1px solid #e2ebe7;
    overflow: hidden;
}

.invisibleContainer {
    height: fit-content;
    display: flex;
    flex: 1;
    flex-direction: column;
    border-radius: 15px;
    padding: 1rem;
    position: relative;
    font-family: "Outfit", sans-serif !important;
    margin: 1rem;
}

.fhgvContainer.fullHeight {
    height: 100%;
}

/* ---- Tabela principal ---- */
.fhgvTable {
    width: 100%;
    color: #2d3748;
    border-collapse: collapse;
}

/* Cabeçalho */
.fhgvTable-title th {
    padding: 0.9rem 1.4rem;
    text-align: left;
    color: #ffffff;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    background-color: #1c6c47;
    border-bottom: none;
}

.fhgvTable-title th:first-child {
    border-radius: 0;
}

.fhgvTable-title th:last-child {
    border-radius: 0;
}

/* Linhas do corpo */
.fhgvTable-line td {
    padding: 1rem 1.4rem;
    height: 100%;
    border-top: 1px solid #f0f4f2;
    vertical-align: middle;
    font-size: 0.95rem;
    color: #374151;
    transition: background-color 0.15s ease;
}

.fhgvTable-line:hover td {
    background-color: #f0faf5;
}

.fhgvTable-line:last-child td {
    border-bottom: none;
}

/* Texto em destaque na tabela */
.destaqueText-table {
    font-weight: 600;
    color: #111827 !important;
}

/* ---- Botões dentro da tabela ---- */
.btn-table {
    padding: 5px 14px;
    text-align: center;
    border-radius: 30px;
    font-family: "Outfit", sans-serif;
    font-size: 13px;
    font-weight: 600;
    width: 120px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-table.classificar {
    color: #1c6c47;
    background-color: #d1f0e0;
    border: 1px solid #a8dfc4;
}

.btn-table.classificar:hover {
    background-color: #b0e0c8;
    box-shadow: 0 2px 8px rgba(28, 108, 71, 0.2);
}

.btn-table.imprimir {
    margin-top: 0.4rem;
    background-color: #dbeafe;
    color: #1a4270;
    border: 1px solid #bfdbfe;
}

.btn-table.imprimir:hover {
    background-color: #bfdbfe;
    box-shadow: 0 2px 8px rgba(26, 66, 112, 0.2);
}

/* ---- Classificação (badges coloridos) ---- */
div.classif {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

div.classif::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
    flex-shrink: 0;
}

div.classif.naoClassificado { color: #6b7280; background-color: #f3f4f6; }
div.classif.minimos         { color: #1e4775; background-color: #dbeafe; }
div.classif.intermediario   { color: #065f46; background-color: #d1fae5; }
div.classif.dependencia     { color: #7c6c26; background-color: #fef9c3; }
div.classif.semiIntenso     { color: #92400e; background-color: #ffedd5; }
div.classif.intenso         { color: #991b1b; background-color: #fee2e2; }
div.classif.baixoRisco      { color: #065f46; background-color: #d1fae5; }
div.classif.altoRisco       { color: #991b1b; background-color: #fee2e2; }
div.classif.dor             { color: #92400e; background-color: #ffedd5; }
div.classif.semDor          { color: #065f46; background-color: #d1fae5; }

/* Células coloridas de classificação */
td.classif.naoClassificado  { background-color: transparent; }
td.classif.minimos          { background-color: #dbeafe30; }
td.classif.intermediario    { background-color: #d1fae530; }
td.classif.dependencia      { background-color: #fef9c330; }
td.classif.semiIntenso      { background-color: #ffedd530; }
td.classif.intenso          { background-color: #fee2e230; }

/* ---- Cores no input valorFinalMsg ---- */
#valorFinalMsg.naoClassificado { background-color: #f4f4f4 !important; color: #6b7280 !important; }
#valorFinalMsg.minimos         { background-color: #dbeafe !important; color: #1e4775 !important; }
#valorFinalMsg.intermediario   { background-color: #d1fae5 !important; color: #065f46 !important; }
#valorFinalMsg.dependencia     { background-color: #fef9c3 !important; color: #7c6c26 !important; }
#valorFinalMsg.semiIntenso     { background-color: #ffedd5 !important; color: #92400e !important; }
#valorFinalMsg.intenso         { background-color: #fee2e2 !important; color: #991b1b !important; }

/* ---- Resultados por página ---- */
.resultsPage {
    gap: 0.5rem;
    margin: 1rem 0 0;
    color: #6b7280;
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

/* ---- Select container ---- */
.select-container {
    position: relative;
    padding: 0;
    min-width: 85px;
    width: auto;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.select-container select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: "Outfit", sans-serif;
    padding: 0.35rem 2rem 0.35rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    color: #374151;
    font-size: 0.9rem;
    width: 100%;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.select-container select:focus {
    border-color: #1c6c47;
    box-shadow: 0 0 0 3px rgba(28, 108, 71, 0.12);
    outline: none;
}

.select-container i {
    position: absolute;
    right: 8px;
    font-size: 11px;
    pointer-events: none;
    color: #6b7280;
}

/* ---- Paginação ---- */
.pagination-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    list-style: none;
    gap: 8px;
    margin-top: 1rem;
    padding: 0.5rem 0;
}

.paginationPages-container {
    border-radius: 50px;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    list-style: none;
    gap: 4px;
}

.pagination-ellipsis {
    border-radius: 7px;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2.1rem;
    background-color: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
    color: #9ca3af;
    font-size: 0.85rem;
}

.pagination-ellipsis p {
    margin: 0;
    vertical-align: middle;
}

.pagination-btn,
.pagination-btnNext {
    border-radius: 50%;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.4rem;
    height: 2.4rem;
    transition: all 0.25s ease;
    cursor: pointer;
    font-size: 0.85rem;
}

.pagination-btn {
    background-color: transparent;
    color: #4b5563;
    font-weight: 600;
    font-size: 0.88rem;
    border-radius: 8px;
}

.pagination-btnNext {
    background-color: #1c6c47;
    color: white;
    box-shadow: 0 2px 6px rgba(28, 108, 71, 0.3);
}

.pagination-btn:hover {
    background-color: #d1f0e0;
    color: #1c6c47;
    transition: all 0.2s ease;
}

.pagination-btnNext:hover {
    background-color: #155736;
    box-shadow: 0 4px 12px rgba(28, 108, 71, 0.4);
    transition: all 0.2s ease;
}

.pagination-btn.active {
    background-color: #1c6c47;
    color: white;
    border: none;
    box-shadow: 0 2px 6px rgba(28, 108, 71, 0.25);
}

.pagination-btnNext:disabled {
    opacity: 0.4;
    pointer-events: none;
    box-shadow: none;
}

/* ---- Texto de registros mostrados ---- */
.pagination-container + p,
p:has(#registroInicial) {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    text-align: center;
}

/* =========================================
   RESPONSIVIDADE
========================================= */
@media (max-width: 1461px) {
    .fhgvContainer {
        margin: 10px !important;
        padding: 15px !important;
        border-radius: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .fhgvContainer-table {
        margin: 10px 0 !important;
        border-radius: 10px !important;
        width: 100% !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: 1px solid #e5e7eb !important;
        display: block !important;
        box-sizing: border-box !important;
    }

    .fhgvTable {
        width: 100% !important;
        min-width: 800px !important;
        table-layout: auto !important;
    }

    .fhgvTable-line td {
        padding: 10px 10px !important;
        font-size: 13px !important;
    }

    .fhgvTable-title th {
        padding: 8px 10px !important;
        font-size: 0.65rem !important;
    }

    .btn-table {
        width: 100% !important;
        max-width: 100px !important;
        font-size: 12px !important;
        padding: 4px 8px !important;
    }

    .searchFor {
        margin-bottom: 15px !important;
        max-width: 100% !important;
    }

    body .navbarPrincipal-list,
    body .flexRow {
        gap: 10px !important;
    }
}

@media (max-width: 1175px) {
    body .navbarPrincipal {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }
}