/* =====================================================
   Semente da Vida – Portal de Transparência
   CSS público do widget Elementor
   ===================================================== */

/* Reset dentro do widget */
.semente-portal *,
.semente-portal *::before,
.semente-portal *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Container principal */
.semente-portal {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

/* Layout de duas colunas */
.semente-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* ── SIDEBAR ── */
.semente-sidebar {
    width: 240px;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex-shrink: 0;
}

.semente-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px 12px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 8px;
}

.semente-filter-icon {
    color: #888;
    font-size: 14px;
}

.semente-sidebar-titulo {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #888;
    text-transform: uppercase;
}

/* Lista de categorias */
.semente-cat-lista {
    list-style: none;
    padding: 0;
}

.semente-cat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.18s ease;
    position: relative;
}

.semente-cat-item:hover {
    background: #f5f5f5;
}

.semente-cat-item.active {
    background: #1d6b3e;
    color: #fff;
    border-radius: 6px;
    margin: 0 8px;
    padding: 10px 10px;
}

.semente-cat-item.active .semente-cat-nome {
    color: #fff;
    font-weight: 600;
}

.semente-cat-item.active .semente-cat-icon {
    filter: brightness(10);
}

.semente-cat-item.active .semente-cat-arrow {
    color: rgba(255,255,255,0.8);
}

.semente-cat-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.semente-cat-nome {
    flex: 1;
    font-size: 13.5px;
    color: #333;
    font-weight: 400;
}

.semente-cat-arrow {
    font-size: 16px;
    color: #bbb;
    font-weight: 300;
}

.semente-cat-count {
    font-size: 11px;
    background: rgba(0,0,0,0.08);
    color: #666;
    border-radius: 10px;
    padding: 1px 7px;
    margin-right: 4px;
}

.semente-cat-item.active .semente-cat-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

/* ── CONTEÚDO PRINCIPAL ── */
.semente-conteudo {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.semente-conteudo-header {
    margin-bottom: 4px;
}

.semente-titulo-secao {
    font-size: 22px;
    font-weight: 700;
    color: #1d6b3e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.semente-subtitulo {
    font-size: 13.5px;
    color: #777;
}

/* ── BUSCA ── */
.semente-busca-wrapper {
    position: relative;
}

.semente-busca-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #aaa;
    pointer-events: none;
}

.semente-busca-input {
    width: 100%;
    padding: 11px 16px 11px 42px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13.5px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.semente-busca-input:focus {
    border-color: #1d6b3e;
    box-shadow: 0 0 0 3px rgba(29,107,62,0.1);
}

.semente-busca-input::placeholder {
    color: #aaa;
}

/* ── LISTA DE DOCUMENTOS ── */
.semente-docs-wrapper {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    min-height: 120px;
}

.semente-doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s;
}

.semente-doc-item:last-child {
    border-bottom: none;
}

.semente-doc-item:hover {
    background: #f9fafb;
}

.semente-doc-icone {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
    background: #f0f7f0;
}

.semente-doc-info {
    flex: 1;
    min-width: 0;
}

.semente-doc-titulo {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.semente-doc-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.semente-doc-categoria {
    font-size: 11px;
    background: #e8f5e9;
    color: #1d6b3e;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.semente-doc-data {
    font-size: 11.5px;
    color: #999;
}

.semente-doc-descricao {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.semente-doc-acoes {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.semente-doc-download {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border: 1.5px solid #1d6b3e;
    border-radius: 6px;
    color: #1d6b3e;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.18s;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
}

.semente-doc-download:hover {
    background: #1d6b3e;
    color: #fff;
    text-decoration: none;
}

.semente-doc-destaque {
    color: #d4a017;
    font-size: 16px;
}

/* ── ESTADO VAZIO ── */
.semente-vazio {
    padding: 48px 24px;
    text-align: center;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.semente-vazio-icone {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.35;
}

.semente-vazio-titulo {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.semente-vazio-sub {
    font-size: 13px;
    color: #aaa;
}

/* ── LOADING ── */
.semente-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    gap: 12px;
    color: #aaa;
    font-size: 13px;
}

.semente-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e5e7eb;
    border-top-color: #1d6b3e;
    border-radius: 50%;
    animation: semente-spin 0.7s linear infinite;
}

@keyframes semente-spin {
    to { transform: rotate(360deg); }
}

/* ── RODAPÉ COMPROMISSO ── */
.semente-compromisso {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    background: #fafafa;
}

.semente-compromisso-conteudo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.semente-compromisso-icon {
    font-size: 20px;
    color: #1d6b3e;
    flex-shrink: 0;
    margin-top: 1px;
}

.semente-compromisso strong {
    display: block;
    font-size: 13.5px;
    color: #222;
    margin-bottom: 4px;
}

.semente-compromisso p {
    font-size: 12.5px;
    color: #666;
    line-height: 1.6;
}

/* ── RESPONSIVO ── */
@media (max-width: 768px) {
    .semente-layout {
        flex-direction: column;
    }

    .semente-sidebar {
        width: 100%;
        min-width: unset;
    }

    .semente-cat-lista {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        padding: 8px 12px;
    }

    .semente-cat-item {
        border-radius: 20px !important;
        padding: 6px 14px !important;
        margin: 0 !important;
        border: 1px solid #e5e7eb;
        background: #f9f9f9;
    }

    .semente-cat-item.active {
        background: #1d6b3e !important;
    }

    .semente-cat-arrow { display: none; }

    .semente-sidebar-header { display: none; }

    .semente-doc-item {
        flex-wrap: wrap;
    }

    .semente-doc-acoes {
        width: 100%;
        justify-content: flex-end;
    }
}
