﻿.meus-relatos-container {
    width: 100%;
    height: 0;
    position: fixed;
    bottom: 0;
    overflow: hidden;
    transition: 0.5s;
}

.meus-relatos-inner-container {
    height: 100%;
    background-color: white;
}

.meus-relatos-header {
    width: 100%;
    height: 60px;
}

.meus-relatos-header-titulo {
    width: 100%;
    height: 100%;
    display: flex;
    float: left;
    justify-content: center;
    align-items: center;
    font-family: 'Roboto';
    font-size: 26px;
}

.meus-relatos-header-close {
    height: 60px;
    right: 33px;
    display: flex;
    position: fixed;
    align-items: center;
    font-size: 22px;
}

#meus-relatos-header-close {
    cursor: pointer;
}

    #meus-relatos-header-close:hover {
        font-size: 23px;
    }


.meus-relatos-conteudo {
    width: 100%;
    height: calc(100% - 60px);
    padding: 20px;
}

.meus-relatos-table-container {
    height: 100%;
    border: 1px solid #EFEFEF;
    overflow: auto;
}

.meus-relatos-table {
    width: 100%;
}

.meus-relatos-table-tr {
    height: 40px;
    font-family: 'Roboto';
    font-size: 14px;
    border: 1px solid #EFEFEF;
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.meus-relatos-table-th {
    font-family: Roboto;
    font-style: normal;
    font-weight: 500;
    font-size: 11px;
    color: #878784;
    padding: 10px
}

.meus-relatos-table-th-center {
    text-align: center
}

#info-acoes-meus-relatos {
    position: relative;
}

#container-info-tip-acoes {
    position: fixed;
    min-width: 200px;
    display: none;
    flex-direction: column;
    gap: 8px;
    background: #FFFFFF;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 4px 4px 5px #00000050;
    color: black;
}

    #container-info-tip-acoes span {
        display: flex;
        gap: 8px;
    }

        #container-info-tip-acoes span p {
            font-family: 'Roboto';
            font-weight: 400;
            line-height: 1.5;
            margin: 0;
        }

.meus-relatos-table-tbody {
    font-family: 'Roboto';
}

.meus-relatos-table-td {
    padding: 10px;
}

/* 1) Protocolo */
.meus-relatos-table th:nth-child(1),
.meus-relatos-table td:nth-child(1) {
    width: 8%;
    min-width: 80px;
}

/* 2) Data */
.meus-relatos-table th:nth-child(2),
.meus-relatos-table td:nth-child(2) {
    width: 8%;
    min-width: 80px;
}

/* 3) Categoria — levemente menor */
.meus-relatos-table th:nth-child(3),
.meus-relatos-table td:nth-child(3) {
    width: 10%;
    min-width: 160px;
}

/* 4) Descrição */
.meus-relatos-table th:nth-child(4),
.meus-relatos-table td:nth-child(4) {
    width: 19%;
    min-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5) Status */
.meus-relatos-table th:nth-child(5),
.meus-relatos-table td:nth-child(5) {
    min-width: 95px;
}

/* 6) Movimentação — reduzida */
.meus-relatos-table th:nth-child(6),
.meus-relatos-table td:nth-child(6) {
    width: 11%;
    min-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 7) Prazo */
.meus-relatos-table th:nth-child(7),
.meus-relatos-table td:nth-child(7) {
    width: 9%;
    min-width: 120px;
    white-space: nowrap;
}

/* Coluna AÇÕES*/
.meus-relatos-table th:nth-child(8),
.meus-relatos-table td:nth-child(8) {
    width: 14%;
    min-width: 200px;
}

/* O TD de ações vira FLEX e ocupa 100% */
.meus-relatos-table td.meus-relatos-acoes {
    display: flex;
    width: 100%;
    height: 100%;
    padding: 20px 16px;
    box-sizing: border-box;
    align-items: left;
    justify-content: left;
    gap: 8px;
    white-space: nowrap;
}

    .meus-relatos-table td.meus-relatos-acoes > * {
        flex: 0 0 auto;
        margin: 0 !important;
    }

    .meus-relatos-table td.meus-relatos-acoes i.fa-eye,
    .meus-relatos-table td.meus-relatos-acoes i.fa-comment,
    .meus-relatos-table td.meus-relatos-acoes i.fa-home {
        display: inline-block;
    }

    /* Ícone do lápis: sem padding/botão*/
    .meus-relatos-table td.meus-relatos-acoes i.fa-pen {
        background: transparent;
        padding: 0;
        border-radius: 0;
        font-size: 16px;
        cursor: pointer;
    }

.meus-relatos-table td:nth-child(3),
.meus-relatos-table td:nth-child(4),
.meus-relatos-table td:nth-child(6) {
    overflow: hidden;
    text-overflow: ellipsis;
}



.meus-relatos-table-td-center {
    text-align: center;
}

.meus-relatos-table-td-i {
    cursor: pointer;
}

    .meus-relatos-table-td-i:hover {
        font-size: 18px;
    }

.meus-relatos-table-tr-tbody {
    background-color: white;
}

    .meus-relatos-table-tr-tbody:hover {
        background-color: #ececec;
    }

.meus-relatos-acoes {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.meus-relatos-table-tr > th:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    top: 0;
    background: #FFF;
    color: #000;
}

.meus-relatos-table-tr-tbody > td:nth-child(1) {
    position: sticky;
    left: 0;
    z-index: 3;
    top: 0;
    background: #FFF;
}

.meus-relatos-table {
    width: 100%;
    border-collapse: collapse;
    overflow-x: auto;
}

.meus-relatos-table-th,
.meus-relatos-ecac-table-td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    white-space: normal; /* permite quebra de linha */
    word-break: break-word; /* quebra palavras longas */
    overflow-wrap: anywhere; /* garante que o texto não vaze */
}

/* Coluna específica de Descrição */
.coluna-descricao {
    min-width: 300px; /* largura mínima maior */
    width: 40%; /* ocupa mais espaço na tabela */
    max-width: 600px; /* impede de estourar */
    white-space: normal; /* permite várias linhas */
    word-break: break-word; /* quebra palavras longas */
    overflow-wrap: anywhere; /* quebra até dentro de palavras longas */
}

/* Primeira coluna fixa */
.meus-relatos-table-th:first-child,
.meus-relatos-ecac-table-td:first-child {
    position: -webkit-sticky;
    position: sticky;
    left: 0;
    background-color: #f2f2f2;
    z-index: 1; /* mantém a primeira coluna sobre as outras */
    width: auto; /* ajusta conforme conteúdo */
}

/* Garante que o cabeçalho da primeira coluna fique acima das demais */
.meus-relatos-table-th:first-child {
    z-index: 2;
}

/* Força a tabela a respeitar as larguras definidas */
table {
    table-layout: fixed;
    width: 100%;
}



.meus-relatos-table-tr:nth-child(even) {
    background-color: #f9f9f9;
}

.meus-relatos-table-th {
    background-color: #29A796;
    color: white;
}

.meus-relatos-table-td-center {
    text-align: center;
}

.meus-relatos-acoes {
    display: flex;
    justify-content: center;
    align-items: center;
}

.table-container {
    width: 100%;
    overflow-x: auto; /* scroll horizontal */
    -webkit-overflow-scrolling: touch; /* melhora o scroll em iOS */
}

    /* Define uma largura mínima para a tabela,
           forçando scroll horizontal em telas menores que 800px */
    .table-container table {
        min-width: 800px; /* ajuste conforme sua necessidade de colunas */
    }

/* Scrollbar Personalizada (opcional) */
::-webkit-scrollbar {
    width: 8px; /* scrollbar vertical (se houver) */
    height: 8px; /* scrollbar horizontal */
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* Botão "Visualizar" */
.meus-relatos-table td i.fa-eye,
.meus-relatos-ecac-table td i.fa-eye {
    background-color: #2563EB;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin-right: 8px;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-weight: 400;
}

/* Botão "Responder" */
.meus-relatos-table td i.fa-comment,
.meus-relatos-ecac-table td i.fa-comment {
    background-color: #10B981;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-weight: 400;
}

/* Botão "Solicitar Habite-se" */
.meus-relatos-table td i.fa-home,
.meus-relatos-ecac-table td i.fa-home {
    background-color: #F59E0B;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 10px;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-weight: 400;
    margin-right: 8px;
}

    /* Texto do botão "Solicitar Habite-se" */
    .meus-relatos-table td i.fa-home::before,
    .meus-relatos-ecac-table td i.fa-home::before {
        content: "Habite-se";
    }

/* Textos dos botões */
.meus-relatos-table td i.fa-eye::before,
.meus-relatos-ecac-table td i.fa-eye::before {
    content: "Visualizar";
}

.meus-relatos-table td i.fa-comment::before,
.meus-relatos-ecac-table td i.fa-comment::before {
    content: "Responder";
}



@media (max-width: 768px) {
    .meus-relatos-table thead {
        display: none;
    }

    .meus-relatos-table,
    .meus-relatos-table tbody {
        display: block;
        width: 100%;
    }

    .painel-opcoes-container {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

    .meus-relatos-table tbody tr {
        display: block;
        margin: 0 0 16px;
        padding: 16px;
        background: #FFFFFF;
        border-radius: 8px;
        position: relative;
        border: 1px solid #E5E7EB; /* 👈 Borda para destacar o card */
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03); /* leve sombra opcional */
    }

    .meus-relatos-table td {
        padding: 2px !important;
        border: none !important; /* 👈 Remove bordas internas */
    }

    .meus-relatos-table tbody tr td:nth-child(1) {
        display: inline-block;
        background: white;
        padding: 8px 12px;
        border-radius: 4px;
        margin-bottom: 16px;
        font-weight: bold;
        color: #000;
    }

        .meus-relatos-table tbody tr td:nth-child(1)::before {
            content: "Protocolo: ";
            color: #6B7280;
            font-weight: normal;
        }

    .meus-relatos-table tbody tr td:nth-child(2) {
        display: block;
        text-align: left;
        font-weight: 500;
        color: #000;
        margin-bottom: 12px;
    }

        .meus-relatos-table tbody tr td:nth-child(2)::before {
            content: "DATA";
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #6B7280;
            margin-bottom: 4px;
        }

    .meus-relatos-table tbody tr td:nth-child(3) {
        display: block;
        width: 100%;
        margin-top: 8px;
        margin-bottom: 2px;
        font-weight: 500;
        color: #8B5A00;
    }

        .meus-relatos-table tbody tr td:nth-child(3)::before {
            content: "CATEGORIA/DESCRIÇÃO";
            display: block;
            font-size: 12px;
            font-weight: 600;
            color: #6B7280;
            margin-bottom: 4px;
        }

    .meus-relatos-table tbody tr td:nth-child(4) {
        display: block;
        width: 100%;
        color: #4B5563;
        padding-bottom: 8px;
    }

    .meus-relatos-table tbody tr td:nth-child(5) {
        position: absolute;
        top: 16px;
        right: 16px;
        display: inline-block;
        padding: 4px 12px;
        border-radius: 16px;
        font-size: 14px;
        font-weight: 500;
        color: #fff;
        background-color: #F59E0B;
        white-space: nowrap;
    }

    .meus-relatos-table tbody tr td:nth-child(6) {
        position: static;
        display: block;
        width: 100%;
        margin-top: 8px;
        text-align: left;
        color: #000;
    }

    .meus-relatos-table tbody tr td:nth-child(7) {
        display: flex;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 12px;
        flex-wrap: wrap;
    }

        .meus-relatos-table tbody tr td:nth-child(7) .btn-visualizar,
        .meus-relatos-table tbody tr td:nth-child(7) .btn-responder {
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 14px;
            color: #fff;
            cursor: pointer;
            border: none;
            display: flex;
            align-items: center;
            gap: 6px;
        }

    .btn-visualizar {
        background-color: #2563EB;
    }

    .btn-responder {
        background-color: #10B981;
    }

        .btn-visualizar i,
        .btn-responder i {
            font-size: 14px;
        }
}
