/**
 * Avanti Developer Donation System Styles
 */

/* ==========================================================================
   Donation Form
   ========================================================================== */

.avanti-donation-form-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 40px;
    color: var(--global-palette3);
    background: var(--global-palette9);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.avanti-donation-title {
    margin: 0 0 10px;
    text-align: center;
}

.avanti-donation-description {
    margin: 0 0 30px;
    text-align: center;
    font-size: 1rem;
}

/* Amount Buttons */
.avanti-donation-amounts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.avanti-amount-btn {
    padding: 16px 20px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avanti-amount-btn:hover {
    background: #eee;
    border-color: var(--global-palette1, #3182ce);
}

.avanti-amount-btn.active {
    background: var(--global-palette1, #3182ce);
    color: var(--global-palette9);
    border-color: var(--global-palette1, #3182ce);
}

.avanti-amount-btn.avanti-custom-btn {
    font-size: 0.95rem;
}

/* Custom Amount Input */
.avanti-custom-amount-wrapper {
    margin-bottom: 24px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.avanti-custom-amount-wrapper label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.avanti-input-group {
    display: flex;
    align-items: stretch;
}

.avanti-currency {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #e0e0e0;
    border: 2px solid #e0e0e0;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-weight: 600;
    color: #555;
}

.avanti-custom-amount-wrapper input[type="number"] {
    flex: 1;
    padding: 14px 16px;
    font-size: 1.25rem;
    border: 2px solid #e0e0e0;
    border-radius: 0 8px 8px 0;
    outline: none;
    -moz-appearance: textfield;
}

.avanti-custom-amount-wrapper input[type="number"]::-webkit-outer-spin-button,
.avanti-custom-amount-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.avanti-custom-amount-wrapper input[type="number"]:focus {
    border-color: var(--global-palette1, #3182ce);
}

.avanti-min-amount {
    display: block;
    margin-top: 8px;
    color: #888;
    font-size: 0.85rem;
}

/* Donate Button */
.avanti-donate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 18px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    background: var(--global-palette1, #3182ce);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.avanti-donate-btn:hover:not(:disabled) {
    background: var(--global-palette2);
	color: var(--global-palette1);
}

.avanti-donate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

button[type=submit].avanti-donate-btn:hover {
	color: var(--global-palette9);
}

.avanti-donate-btn .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.avanti-donate-btn .spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Message */
.avanti-donation-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
}

.avanti-donation-message.success {
    background: #d4edda;
    color: #155724;
}

.avanti-donation-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* ==========================================================================
   My Donations (My Account)
   ========================================================================== */

.avanti-my-donations {
    padding: 20px 0;
}

.avanti-donation-summary {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
    padding: 24px;
    background: linear-gradient(135deg, var(--global-palette1, #3182ce) 0%, var(--global-palette2, #2c5aa0) 100%);
    border-radius: 12px;
    color: #fff;
}

.avanti-donation-summary .label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.avanti-donation-summary .amount,
.avanti-donation-summary .count {
    font-size: 2rem;
    font-weight: 700;
}

.avanti-donations-table {
    width: 100%;
    border-collapse: collapse;
}

.avanti-donations-table th,
.avanti-donations-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.avanti-donations-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.avanti-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.avanti-status-completed {
    background: #d4edda;
    color: #155724;
}

.avanti-status-processing {
    background: #fff3cd;
    color: #856404;
}

.avanti-no-donations {
    padding: 40px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 8px;
}

/* ==========================================================================
   Donor Wall
   ========================================================================== */

.avanti-donor-wall {
    padding: 40px 0;
}

.avanti-donor-wall-title {
    margin: 0 0 30px;
    font-size: 1.75rem;
    font-weight: 600;
    text-align: center;
    color: #1a1a1a;
}

.avanti-donor-grid {
    display: grid;
    gap: 20px;
}

.avanti-donor-grid.columns-1 { grid-template-columns: 1fr; }
.avanti-donor-grid.columns-2 { grid-template-columns: repeat(2, 1fr); }
.avanti-donor-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
.avanti-donor-grid.columns-4 { grid-template-columns: repeat(4, 1fr); }

.avanti-donor-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.avanti-donor-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.avanti-donor-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.avanti-donor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.avanti-donor-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1rem;
}

.avanti-donor-amount {
    color: var(--global-palette1, #3182ce);
    font-weight: 600;
    font-size: 1.1rem;
}

.avanti-donor-date {
    font-size: 0.85rem;
    color: #888;
}

.avanti-no-donors {
    padding: 60px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 12px;
    font-size: 1.1rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .avanti-donation-form-wrapper {
        padding: 24px;
        margin: 0 16px;
    }
    
    .avanti-donation-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avanti-donation-summary {
        flex-direction: column;
        gap: 20px;
    }
    
    .avanti-donor-grid.columns-3,
    .avanti-donor-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .avanti-donation-amounts {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .avanti-amount-btn {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .avanti-donor-grid.columns-2,
    .avanti-donor-grid.columns-3,
    .avanti-donor-grid.columns-4 {
        grid-template-columns: 1fr;
    }
    
    .avanti-donations-table th,
    .avanti-donations-table td {
        padding: 10px 8px;
        font-size: 0.9rem;
    }
}
