/* Donation Leaderboard Styles */
.donation-leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.leaderboard-section {
    margin-bottom: 40px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.leaderboard-header {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 25px;
    text-align: center;
}

.recent-header {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
}

.leaderboard-header h2 {
    margin: 0 0 8px 0;
    font-size: 24px;
    font-weight: 600;
}

.leaderboard-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.leaderboard-content {
    padding: 0;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
}

.leaderboard-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

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

.leaderboard-item.top-three {
    background: linear-gradient(90deg, #fff9e6, #ffffff);
}

.leaderboard-item.top-three:hover {
    background: linear-gradient(90deg, #fff4d6, #f8f9fa);
}

.position {
    width: 60px;
    text-align: center;
    margin-right: 20px;
}

.position-number {
    font-size: 18px;
    font-weight: 600;
    color: #555;
}

.avatar {
    width: 50px;
    height: 50px;
    margin-right: 20px;
    position: relative;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6b6b;
}

.recent-item .avatar img {
    border-color: #4ecdc4;
}

.default-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 20px;
}

.user-info {
    flex: 1;
    margin-right: 20px;
}

.user-info h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.member-level {
    background: #f1f3f4;
    color: #5f6368;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    display: inline-block;
    margin-right: 8px;
}

.time-ago {
    color: #888;
    font-size: 12px;
    font-style: italic;
}

.amount {
    font-size: 20px;
    font-weight: 700;
    color: #ff6b6b;
    min-width: 100px;
    text-align: right;
}

.recent-item .amount {
    color: #4ecdc4;
}

/* Top 3 special styling */
.leaderboard-item:nth-child(1) .position {
    background: linear-gradient(135deg, #ffd700, #ffed4a);
    color: #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

.leaderboard-item:nth-child(2) .position {
    background: linear-gradient(135deg, #c0c0c0, #e5e5e5);
    color: #333;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

.leaderboard-item:nth-child(3) .position {
    background: linear-gradient(135deg, #cd7f32, #daa520);
    color: white;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 25px;
}

/* Locked member badge */
.member-level:contains("Locked") {
    background: #ff6b6b;
    color: white;
}

/* Premium member badge */
.member-level:contains("Premium") {
    background: #4ecdc4;
    color: white;
}

/* VIP member badge */
.member-level:contains("VIP") {
    background: #ffd700;
    color: #333;
}

/* Semi Risk member badge */
.member-level:contains("Semi Risk") {
    background: #ff9800;
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .donation-leaderboard-container {
        padding: 10px;
    }
    
    .leaderboard-item {
        padding: 15px;
        flex-wrap: wrap;
    }
    
    .position {
        width: 40px;
        margin-right: 15px;
    }
    
    .leaderboard-item:nth-child(1) .position,
    .leaderboard-item:nth-child(2) .position,
    .leaderboard-item:nth-child(3) .position {
        width: 40px;
        height: 40px;
        margin-right: 20px;
    }
    
    .avatar {
        width: 40px;
        height: 40px;
        margin-right: 15px;
    }
    
    .amount {
        font-size: 18px;
        min-width: 80px;
    }
    
    .user-info h3 {
        font-size: 14px;
    }
    
    .leaderboard-header h2 {
        font-size: 20px;
    }
}

/* Autocomplete Styles */
.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 9999;
    font-family: inherit;
}

.ui-menu-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.ui-menu-item:last-child {
    border-bottom: none;
}

.ui-menu-item-wrapper {
    padding: 8px 12px;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: #333;
}

.ui-menu-item-wrapper:hover,
.ui-state-active {
    background: #ff6b6b !important;
    color: white !important;
    border: none !important;
}

/* Loading state for autocomplete */
.loading {
    background-image: url('data:image/gif;base64,R0lGODlhEAAQAPIAAP///wAAAMLCwkJCQgAAAGJiYoKCgpKSkiH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAAEAAQAAADMwi63P4wyklrE2MIOggZnAdOmGYJRbExwroUmcG2LmDEwnHQLVsYOd2mBzkYDAdKa+dIAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P5OjCEgG4QMu7DmikRxQlFUYDEZIGBMRVsaqHwctXXf7WEYB4Ag1xjihkMZsiUkKhIAIfkECQoAAAAsAAAAABAAEAAAAzYIujIjK8pByJDMlFYvBoVjHA70GU7xSUJhmKtwHPAKzLO9HMaoKwJZ7Rf8AYPDDzKpZBqfvwQAIfkECQoAAAAsAAAAABAAEAAAAzMIumIlK8oyhpHsnFZfhYumCYUhDAQxRIdhHBGqRoKw0R8DYlJd8z0fMDgsGo/IpHI5TAAAIfkECQoAAAAsAAAAABAAEAAAAzIIunInK0rnZBTwGPNMgQwmdsNgXGJUlIWEuR5oWUIpz8pAEAMe6TwfwyYsGo/IpFKSAAAh+QQJCgAAACwAAAAAEAAQAAADMwi6IMKQORfjdOe82p4wGccc4CEuQradylesojEMBgsUc2G7sDX3lQGBMLAJibufbSlKAAAh+QQJCgAAACwAAAAAEAAQAAADMgi63P7wjRHDdpk6MgYBmJdFkBNBaG50zOlpfh4FJ/K5gT9BxGCHqlGYVElF8wkOOWQ4AQAh+QQJCgAAACwAAAAAEAAQAAADMgi6AP5owTCjUKkoEGCGyQcAg8hT0SoBSQLPxwGHCqX0F/KrCBl/JR5QM6E7bG7KAAAh+QQJCgAAACwAAAAAEAAQAAADNAi63P7wjRAOgu6IQdpIXC/KPOp4EcbUNJpP7Ej4Y2/VdpA2xK4X1y1HSkuY0qSiNMoOOWQ4AQA7') !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
}

/* Edit Dialog Styles */
#edit-donation-dialog {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#edit-donation-dialog .form-table th {
    width: 150px;
    padding-left: 0;
}

#edit-donation-dialog .form-table td {
    padding-left: 20px;
}

.ui-dialog-titlebar {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
}

.ui-dialog-title {
    color: white !important;
    font-weight: 600 !important;
}

.ui-dialog-titlebar-close {
    background: rgba(255,255,255,0.2) !important;
    border: none !important;
    border-radius: 4px !important;
}

.ui-dialog-titlebar-close:hover {
    background: rgba(255,255,255,0.3) !important;
}

.ui-dialog-content {
    padding: 20px !important;
}

.ui-dialog-buttonpane {
    border-top: 1px solid #eee !important;
    background: #f9f9f9 !important;
}

.ui-dialog-buttonpane button {
    background: #ff6b6b !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 8px 16px !important;
    font-weight: 500 !important;
    margin-left: 8px !important;
}

.ui-dialog-buttonpane button:hover {
    background: #ff5252 !important;
}

.ui-dialog-buttonpane button:last-child {
    background: #6c757d !important;
}

.ui-dialog-buttonpane button:last-child:hover {
    background: #545b62 !important;
}

/* Admin form styles */
.donation-admin-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-top: 20px;
}

.add-donation-form {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.add-donation-form h2 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 2px solid #ff6b6b;
    padding-bottom: 10px;
}

.recent-donations {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.recent-donations h2 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 2px solid #4ecdc4;
    padding-bottom: 10px;
}

/* Admin button styles */
.edit-donation {
    background: #0073aa !important;
    color: white !important;
    border: none !important;
    margin-right: 5px !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
}

.edit-donation:hover {
    background: #005a87 !important;
}

.delete-donation {
    background: #dc3545 !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
}

.delete-donation:hover {
    background: #c82333 !important;
}

#clear-form {
    background: #6c757d !important;
    color: white !important;
    border: none !important;
    border-radius: 4px !important;
}

#clear-form:hover {
    background: #545b62 !important;
}

/* Form field enhancement */
.form-table input[type="text"],
.form-table input[type="number"],
.form-table input[type="url"],
.form-table select {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 300px;
}

.form-table input:focus,
.form-table select:focus {
    border-color: #ff6b6b !important;
    box-shadow: 0 0 0 1px #ff6b6b;
    outline: none;
}

/* Description text styling */
.form-table .description {
    font-style: italic;
    color: #666;
    font-size: 12px;
    margin-top: 4px;
}

/* Enhanced autocomplete input */
.ui-autocomplete-input {
    position: relative;
}

/* Success animation */
@keyframes successGlow {
    0% { background-color: #d4edda; }
    100% { background-color: transparent; }
}

.success-highlight {
    animation: successGlow 2s ease-out;
}

/* Success notices */
.notice-success {
    border-left-color: #46b450 !important;
    background: #ecf7ed !important;
}

@media (max-width: 1024px) {
    .donation-admin-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}