/*************************************
   Layout da Grade (Downloads)
*************************************/
/* Ícones FA (se não carregado globalmente) */
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.6.0/css/all.min.css'); /* Atualizado para FA6 mais recente */
.fa-fw {
    width: 1.25em; /* Largura fixa para alinhamento */
}
.downloads-grid {
    display: grid;
    /* Cria colunas automáticas: mínimo 280px, máximo preenche o espaço */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 15px;
    background: #1e1e1e; /* Fundo escuro para modo dark */
    border-radius: 0 0 7px 7px;
}
/* Ajuste para dispositivos móveis muito pequenos */
@media (max-width: 350px) {
    .downloads-grid {
        grid-template-columns: 1fr;
    }
}
/*************************************
   Design do Card
*************************************/
.simpledown-card {
    background: #2c2c2c; /* Fundo dark para itens */
    border-radius: 8px;
    border: 1px solid #444; /* Moldura escura */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%; /* Garante altura igual no grid */
    box-sizing: border-box;
}
.card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Faz o conteúdo expandir para empurrar o rodapé para baixo */
}
/* Título do Arquivo */
.file-title {
    margin: 0 0 10px 0 !important;
    font-size: 1.25em !important;
    font-weight: bold !important;
    color: #ffa800 !important; /* Azul claro para visibilidade em dark */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #333 !important;
    padding-bottom: 5px !important;
}
/* Linha de Estatísticas (Tamanho e Downloads) */
.file-info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 0.9em;
    color: #ccc;
}
.file-info-row span {
    display: flex;
    align-items: center;
}
.file-info-row i {
    margin-right: 5px;
    color: #bbb;
    transition: none !important;
}
/* Descrição do Arquivo */
.file-description {
    font-size: 0.95em;
    color: #ddd;
    line-height: 1.5;
    margin-bottom: 20px;
    /* Limita a descrição a 2 linhas para manter simetria */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3em;
}
/*************************************
   Rodapé e Botão de Download
*************************************/
.card-footer {
    margin-top: auto; /* Cola o botão sempre no fundo do card */
    padding-top: 10px;
}
/* Estilo do Botão Customizado */
.download-btn {
    display: block !important;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
    margin: 0 !important;
    background: #333 !important; /* Cinza escuro para modo dark */
    background-image: linear-gradient(to bottom, #444, #222) !important;
    border: 1px solid #555 !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    padding: 10px 0 !important;
    font-weight: bold !important;
    text-transform: uppercase;
    font-size: 0.9em !important;
    text-decoration: none !important;
}
.download-btn:hover, .download-btn:focus, .download-btn:active {
    background: #222 !important;
    background-image: linear-gradient(to bottom, #333, #111) !important;
    border: 1px solid #555 !important;
    color: #ffffff !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-weight: bold !important;
}
.download-btn .icon {
    transition: none !important;
}
.button .icon, .button-secondary {
    color: #FFFFFF;
}
/*************************************
   Filtro e Mensagens
*************************************/
.simpledown-filter-container {
    margin: 15px 0;
    padding: 10px;
    background: #333;
    border-radius: 5px;
}
.category-filter-select {
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #555;
    font-size: 14px;
    width: 100%;
    max-width: 350px;
    cursor: pointer;
    background: #2c2c2c;
    color: #ddd;
}
.no-files-msg {
    grid-column: 1 / -1; /* Ocupa a largura toda do grid */
    padding: 20px;
    text-align: center;
    color: #bbb;
    background: #2c2c2c;
    border: 1px dashed #555;
    margin: 10px;
}
/* Ajuste do Cabeçalho da Categoria */
.category-block .header dt {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
    color: #ddd !important;
}
/* Moldura em volta da categoria */
.category-block {
    border: 1px solid #555; /* Moldura escura para dark mode */
    border-radius: 8px; /* Bordas arredondadas */
    padding: 10px; /* Espaçamento interno */
    margin-bottom: 20px; /* Espaço entre categorias */
    background: #222; /* Fundo dark para categoria */
}
/* Moldura em volta dos itens (cards) */
.simpledown-card {
    border: 1px solid #444; /* Moldura escura */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* Sombra mais escura para "moldura" 3D */
}
/* Estilo para a caixa de "Nenhum download disponível" */
.panel.empty-state {
    text-align: center; /* Centraliza o texto */
    background: #2c2c2c; /* Fundo dark */
    border: 1px solid #444; /* Moldura escura */
    border-radius: 8px; /* Bordas arredondadas */
    padding: 20px; /* Espaçamento interno */
    color: #ddd; /* Cor do texto clara para dark mode */
    margin: 20px auto; /* Centraliza horizontalmente a caixa */
    max-width: 600px; /* Largura máxima para melhor visualização */
}
.panel.empty-state .inner p {
    margin: 0; /* Remove margens extras no parágrafo */
}
.side-segment > h3 {
    color: #fff;
}
.side-segment h3:after, .side-segment h2:after {
    background-color: #ffa800;
}