/* ============================================
   ESTILOS BASE
============================================ */
.gdwp-download-wrapper {
    max-width: 600px;
    margin: 20px 0;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.gdwp-download-title {
    font-size: 1.4em;
    margin-top: 0;
    color: #333;
}

.gdwp-download-description {
    margin: 15px 0;
    color: #666;
    line-height: 1.6;
}

.gdwp-form-container {
    margin-top: 20px;
}

.gdwp-form-container h4 {
    margin-bottom: 15px;
    color: #333;
}

.gdwp-download-form {
    margin-top: 10px;
}

.gdwp-form-group {
    margin-bottom: 15px;
}

.gdwp-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.gdwp-form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    font-size: 14px;
}

.gdwp-form-group input:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
}

.gdwp-form-group input.error {
    border-color: #dc3232;
}

.gdwp-download-button {
    display: inline-block;
    padding: 12px 30px;
    background: #0073aa;
    color: #fff !important;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s ease;
}

.gdwp-download-button:hover {
    background: #005a87;
    color: #fff !important;
}

.gdwp-download-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gdwp-message {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 4px;
}

.gdwp-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.gdwp-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* ============================================
   LAYOUT: LISTA (PADRÃO)
============================================ */
.gdwp-list-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px; /* ESPAÇAMENTO INFERIOR */
    padding-bottom: 20px; /* ESPAÇAMENTO INFERIOR */
}

.gdwp-list-layout .gdwp-download-item {
    display: flex;
    flex-direction: column;
    padding: 20px 25px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    transition: box-shadow 0.3s ease;
    margin-bottom: 5px; /* Pequeno espaçamento entre itens */
}

.gdwp-list-layout .gdwp-download-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.gdwp-list-layout .gdwp-item-content {
    flex: 1;
}

.gdwp-list-layout .gdwp-item-content h4 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.2em;
}

.gdwp-list-layout .gdwp-item-content p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.gdwp-list-layout .gdwp-item-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.gdwp-list-layout .gdwp-download-count {
    font-size: 0.9em;
    color: #888;
}

.gdwp-list-layout .gdwp-download-button {
    padding: 8px 25px;
    font-size: 0.95em;
}

/* ============================================
   LAYOUT: GALERIA (GRID)
============================================ */
.gdwp-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px; /* ESPAÇAMENTO INFERIOR */
    padding-bottom: 20px; /* ESPAÇAMENTO INFERIOR */
}

.gdwp-grid-layout .gdwp-download-item {
    display: flex;
    flex-direction: column;
    padding: 25px 20px;
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    text-align: center;
}

.gdwp-grid-layout .gdwp-download-item:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateY(-4px);
}

.gdwp-grid-layout .gdwp-item-icon {
    margin-bottom: 15px;
}

.gdwp-grid-layout .gdwp-file-icon {
    font-size: 3.5em;
    display: block;
    line-height: 1;
}

.gdwp-grid-layout .gdwp-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gdwp-grid-layout .gdwp-item-content h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.gdwp-grid-layout .gdwp-item-content p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
    flex: 1;
    line-height: 1.5;
}

.gdwp-grid-layout .gdwp-item-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.gdwp-grid-layout .gdwp-download-count {
    font-size: 0.85em;
    color: #888;
}

.gdwp-grid-layout .gdwp-download-button {
    width: 100%;
    text-align: center;
    padding: 10px 20px;
    font-size: 0.95em;
}

/* ============================================
   ESTATÍSTICAS
============================================ */
.gdwp-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 30px; /* ESPAÇAMENTO INFERIOR */
}

.gdwp-stat-item {
    text-align: center;
}

.gdwp-stat-label {
    display: block;
    font-size: 0.85em;
    color: #666;
}

.gdwp-stat-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #0073aa;
}

/* ============================================
   EMPTY STATE
============================================ */
.gdwp-empty {
    padding: 30px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
    border: 1px dashed #ddd;
    margin-bottom: 30px; /* ESPAÇAMENTO INFERIOR */
}

.gdwp-error {
    padding: 15px;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px; /* ESPAÇAMENTO INFERIOR */
}

/* ============================================
   RESPONSIVIDADE
============================================ */
@media (max-width: 768px) {
    .gdwp-grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 15px;
        margin-bottom: 30px;
    }
    
    .gdwp-download-wrapper {
        padding: 15px;
    }
    
    .gdwp-download-button {
        width: 100%;
        text-align: center;
    }
    
    .gdwp-list-layout .gdwp-item-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .gdwp-list-layout .gdwp-download-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gdwp-grid-layout {
        grid-template-columns: 1fr;
        margin-bottom: 25px;
    }
    
    .gdwp-list-layout {
        margin-bottom: 25px;
    }
}

/* Espaçamento extra para o rodapé */
.gdwp-download-list {
    margin-bottom: 160px !important;
    padding-bottom: 30px !important;
}

.gdwp-download-list .gdwp-download-item:last-child {
    margin-bottom: 30px !important;
}