/* ESTILOS DO FORMULÁRIO DE PESQUISA */
.form-pesquisa {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    margin-bottom: 20px;
}

.form-pesquisa .form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.form-pesquisa .form-control-sm {
    border-radius: 6px;
    border: 1px solid #ced4da;
    transition: all 0.3s ease;
}

.form-pesquisa .form-control-sm:focus {
    border-color: #204d74;
    box-shadow: 0 0 0 0.2rem rgba(32, 77, 116, 0.25);
}

.form-pesquisa .btn-sm {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.form-pesquisa .btn-primary {
    background-color: #204d74;
    border-color: #204d74;
}

.form-pesquisa .btn-primary:hover {
    background-color: #1a3d5f;
    border-color: #1a3d5f;
    transform: translateY(-1px);
}

.form-pesquisa .btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.form-pesquisa .btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
}

.hidden-clear-btn {
    display: none !important;
}

.show-clear-btn {
    display: flex !important;
}

/* ESTILOS DA CAIXA DE INFORMAÇÃO EXPANSÍVEL */
.info-box {
    /* background: rgb(44 49 54); */
    border: 1px solid #bbdefb;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-box:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.info-header i {
    color: #1976d2;
    font-size: 20px;
}

.info-header h6 {
    margin: 0;
    color: #1976d2;
    font-weight: 700;
    font-size: 18px;
}

.info-body {
    color: #0d47a1;
}

.info-summary {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 0;
    font-weight: 500;
}

.info-details {
    display: none;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(25, 118, 210, 0.2);
}

.info-details p {
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 12px;
}

.info-details p:last-child {
    margin-bottom: 0;
}

.info-details strong {
    color: #1565c0;
    font-weight: 600;
}

.expand-toggle {
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #204d74 0%, #1a3d5f 100%);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(32, 77, 116, 0.3);
    display: flex;
    align-items: center;
    gap: 6px;
}

.expand-toggle:hover {
    background: linear-gradient(135deg, #1a3d5f 0%, #15334d 100%);
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 4px 10px rgba(32, 77, 116, 0.4);
}

.expand-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* LOADING */
.loading-container {
    padding: 20px;
    text-align: center;
}

.loading-container .spinner-grow {
    width: 2rem;
    height: 2rem;
}

/* PAGINAÇÃO */
.pagination-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    margin-bottom: 20px;
}

.pagination-container .pagination {
    margin: 0;
}

.pagination-container .page-link {
    color: #204d74;
    background-color: white;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    margin: 0 2px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-container .page-link:hover {
    color: white;
    background-color: #204d74;
    border-color: #204d74;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-container .page-item.active .page-link {
    color: white;
    background-color: #204d74;
    border-color: #204d74;
    font-weight: 600;
}

.pagination-container .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #e9ecef;
    border-color: #dee2e6;
    cursor: not-allowed;
}

/* TABS E TABELAS */
.tab-button.active {
    color: white !important;
}

.custom-accordion .accordion-item {
    border: 1px solid #dee2e6;
    margin-bottom: 5px;
}

.custom-accordion .accordion-header button {
    background-color: #f8f9fa;
    color: #204d74;
    font-weight: 600;
}

.custom-accordion .accordion-header button:focus {
    box-shadow: none;
}

.year-badge {
    font-size: 1.1rem;
    font-weight: bold;
}

.table-container {
    overflow-x: auto;
}

.custom-table {
    margin-bottom: 0;
}

.custom-table th {
    background-color: #204d74;
    color: white;
    font-weight: 600;
}

/* ÍCONES DE DOCUMENTOS */
.documento-icone {
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.documento-icone.text-danger {
    color: #dc3545 !important;
}

.documento-icone.text-primary {
    color: #0d6efd !important;
}

.documento-icone.text-success {
    color: #198754 !important;
}

.documento-icone.text-warning {
    color: #fd7e14 !important;
}

.documento-icone.text-info {
    color: #0dcaf0 !important;
}

.documento-icone.text-muted {
    color: #6c757d !important;
}

.documento-icone.text-secondary {
    color: #6c757d !important;
}

.icone-hover {
    transform: scale(1.2) !important;
    filter: brightness(1.2);
    transition: all 0.3s ease;
}

.sem-documento {
    color: #999;
    font-style: italic;
}

.documento-link {
    display: inline-block;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.documento-link:hover {
    background-color: rgba(32, 77, 116, 0.1);
    text-decoration: none;
}

/* FILE LINKS */
.file-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f8f9fa;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.file-link:hover {
    background: #e9ecef;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.icon-container {
    margin-right: 10px;
    position: relative;
}

.icon-default {
    display: inline-block;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.icon-hover {
    display: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.file-link:hover .icon-default {
    display: none;
}

.file-link:hover .icon-hover {
    display: inline-block;
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    20%,
    60%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-3px);
    }

    80% {
        transform: translateY(-1px);
    }
}

.file-name {
    color: #495057;
    font-weight: 500;
    flex: 1;
}

.file-link:hover .file-name {
    color: #204d74;
    font-weight: 600;
}

/* ALERTAS */
.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* CORES UTILITÁRIAS */
.text-danger {
    color: #dc3545 !important;
}

.text-primary {
    color: #0d6efd !important;
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #fd7e14 !important;
}

.text-info {
    color: #0dcaf0 !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-secondary {
    color: #6c757d !important;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
    .form-pesquisa {
        padding: 15px;
    }

    .pagination-container .page-link {
        padding: 8px 12px;
        font-size: 14px;
    }

    .info-box {
        padding: 15px;
    }

    .info-header h6 {
        font-size: 16px;
    }

    .info-summary {
        font-size: 14px;
    }

    .info-details p {
        font-size: 13px;
    }

    .expand-toggle {
        padding: 5px 14px;
        font-size: 12px;
    }
}

/* ESTILOS PARA MÚLTIPLOS DOCUMENTOS */
.documento-links-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.documento-link.ml-2 {
    margin-left: 8px;
}

.documento-links-container .documento-link {
    display: inline-block;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.documento-links-container .documento-link:hover {
    background-color: rgba(32, 77, 116, 0.1);
    transform: scale(1.1);
}

/* Adicionar um pequeno tooltip para mostrar o tipo de arquivo quando há múltiplos */
.documento-links-container .documento-link::after {
    content: attr(title);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    pointer-events: none;
}

.documento-links-container .documento-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Melhorar espaçamento quando há vários documentos */
.custom-table td.text-center .documento-links-container {
    min-height: 30px;
    align-items: center;
}

/* Responsividade para múltiplos documentos */
@media (max-width: 768px) {
    .documento-links-container {
        gap: 4px;
    }

    .documento-link.ml-2 {
        margin-left: 4px;
    }

    .documento-icone {
        font-size: 1.2rem;
    }

    .documento-links-container .documento-link::after {
        font-size: 9px;
        padding: 1px 4px;
    }
}

/* Adicionar um pequeno separador visual quando há múltiplos documentos do mesmo tipo */
.documento-links-container .documento-link:not(:last-child)::before {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 15px;
    background-color: #dee2e6;
    opacity: 0.5;
}

/* Estilo especial para quando há mais de 3 arquivos */
.documento-links-container:has(.documento-link:nth-child(4)) {
    max-width: 120px;
    justify-content: space-around;
}

.documento-links-container:has(.documento-link:nth-child(4)) .documento-icone {
    font-size: 1.2rem;
}