/* ========================================= */
/* --- Dashboard Custom CSS ---              */
/* ========================================= */

.woocommerce-MyAccount-content h2 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    font-family: "Adelle", serif;
    color: #333333;
}

.woocommerce-MyAccount-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.dashboard-section {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.dashboard-section h3 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 0;
    color: #00669c;
    font-family: "Adelle", serif;
}

/* --- Cartão da Edição Mais Recente --- */
.recent-edition-card {
    border: 2px solid #00669c;
    text-align: center;
    padding: 30px 20px;
}

.recent-edition-card h3 {
    font-size: 22px;
    margin-bottom: 20px;
}

.recent-edition-link {
    display: inline-block;
    text-decoration: none;
    color: #333;
}

.recent-edition-link:hover .recent-edition-content {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recent-edition-content {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recent-edition-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07),
                0 2px 4px rgba(0, 0, 0, 0.07),
                0 4px 8px rgba(0, 0, 0, 0.07);
    margin-bottom: 15px;
}

.recent-edition-name {
    font-size: 18px;
    font-weight: bold;
    color: #00669c;
    margin: 0;
}

/* --- Botões de Chamada para Ação (CTAs) --- */
.dashboard-cta {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: #333333;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    margin-top: 15px;
}

.dashboard-cta:hover {
    background-color: #1a1a1a;
}

.dashboard-cta.primary {
    background-color: #00669c;
}

.dashboard-cta.primary:hover {
    background-color: #005280;
}

/* --- Estilos para Mensagens e Links de Conta --- */
.download-access-info,
.account-links,
.no-downloads-message,
.archive-info-dashboard,
.archive-info-downloads {
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: none; /* Remove a sombra extra para um look mais limpo */
}

/* Mensagem de "sem downloads" */
.no-downloads-message {
    border-style: dashed;
    font-style: italic;
    color: #777;
}

.no-downloads-message h3 {
    margin-bottom: 10px;
}

/* --- Nova Secção para o Arquivo Antigo --- */
.archive-info-dashboard {
    background-color: rgba(0, 102, 156, 0.03); /* Verde esbatido */
    border: 1px solid rgba(0, 102, 156, 0.1); /* Borda mais suave */
}

.archive-info-dashboard h3 {
    font-size: 16px; /* Letra mais pequena */
    margin-bottom: 5px;
}

.archive-info-dashboard p {
    font-size: 14px; /* Letra ainda mais pequena para o parágrafo */
    margin-bottom: 15px;
}

.archive-info-downloads {
    margin-top: 30px;
    padding: 20px;
    background-color: rgba(0, 102, 156, 0.03);
    border: 1px solid rgba(0, 102, 156, 0.1);
    border-radius: 8px;
    text-align: center;
}

.archive-info-downloads h3 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #00669c;
}

.archive-info-downloads p {
    font-size: 14px;
    margin-bottom: 15px;
}

/* ========================================= */
/* --- Desktop e Tablet Styles ---  */
/* ========================================= */

@media (min-width: 769px) {
    /* Usa uma grelha para criar um layout de duas colunas */
    .woocommerce-MyAccount-content {
        display: grid;
        grid-template-columns: minmax(320px, 380px) 1fr; /* Coluna da esquerda com largura fixa */
        gap: 30px;
        align-items: start; /* Alinha o conteúdo verticalmente ao topo */
    }

    /* Posiciona os elementos na grelha */
    .recent-edition-card {
        grid-column: 1 / 2; /* Ocupa a primeira coluna */
    }

    .dashboard-sections-right {
        grid-column: 2 / 3;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    /* Reposiciona os elementos de topo para manter a ordem visual */
    .woocommerce-MyAccount-content > p {
        grid-column: 1 / 3;
    }
    
    .woocommerce-MyAccount-content > h2 {
        grid-column: 1 / 3;
    }

    .no-downloads-message {
        grid-column: 1 / 3; /* Ocupa as duas colunas quando não há downloads */
    }
    
    .recent-edition-content {
        height: 100%;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .account-links a {
        display: block; /* Links de gestão da conta na vertical em desktop */
        width: 100%;
        margin-bottom: 5px;
    }
}