/* Participant Stats */
.wxgiveaway-participant-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.wxgiveaway-participant-stat-box {
    flex: 1;
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.wxgiveaway-participant-stat-label {
    display: block;
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    color: white;
}

.stat-value {
    display: block;
    font-size: 32px;
    font-weight: bold;
}

/* Participant Grid */
.wxgiveaway-participant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Participant Card */
.participant-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible; /* Changed from hidden to visible */
    z-index: 1;
}

.participant-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
    z-index: 10; /* Higher z-index on hover */
}

/* Participant Avatar */
.participant-avatar {
    flex-shrink: 0;
    margin-right: 15px;
}

.participant-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #667eea;
    object-fit: cover;
}

/* Participant Info */
.participant-info {
    flex: 1;
    min-width: 0;
}

.participant-name {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.participant-orders,
.participant-tickets {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.info-label {
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

.order-numbers {
    color: #667eea;
}

/* Ticket Section */
.participant-tickets {
    position: relative;
}

.ticket-count {
    display: inline-block;
    padding: 2px 8px;
    background: #f0f0f0;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin-left: 5px;
}

.view-tickets-btn {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(102, 126, 234, 0.3);
}

.view-tickets-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

.view-tickets-btn.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Ticket Numbers Dropdown */
.ticket-numbers-list {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    z-index: 1000; /* Very high z-index */
    margin-top: 5px;
    padding: 15px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.ticket-numbers-list.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Ticket numbers grid layout for better visibility */
.ticket-numbers-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 8px;
}

.ticket-number {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    color: white;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.ticket-number:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
}

/* Scrollbar styling for ticket list */
.ticket-numbers-list::-webkit-scrollbar {
    width: 8px;
}

.ticket-numbers-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.ticket-numbers-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

.ticket-numbers-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Participant Badge */
.participant-badge {
    flex-shrink: 0;
    margin-left: 15px;
}

.ticket-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

/* No Participants Message */
.wxgiveaway-no-participants {
    text-align: center;
    padding: 50px 20px;
    background: #f9f9f9;
    border-radius: 12px;
}

.wxgiveaway-no-participants p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* Load More Button */
.wxgiveaway-load-more {
    text-align: center;
    margin-top: 30px;
}

.load-more-btn {
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wxgiveaway-participant-stats {
        flex-direction: column;
        gap: 10px;
    }

    .wxgiveaway-participant-grid {
        grid-template-columns: 1fr;
    }

    .participant-card {
        flex-wrap: wrap;
    }

    .participant-badge {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        text-align: center;
    }

    .ticket-badge {
        width: 100%;
        text-align: center;
    }

    /* Adjust ticket dropdown for mobile */
    .ticket-numbers-list {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 90%;
        max-width: 400px;
        max-height: 80vh;
        z-index: 9999;
    }

    .ticket-numbers-list.show {
        transform: translate(-50%, -50%);
    }

    /* Add overlay for mobile */
    body.tickets-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
    }
}

@media (max-width: 480px) {
    .participant-card {
        flex-direction: column;
        text-align: center;
    }

    .participant-avatar {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .participant-info {
        width: 100%;
    }

    .participant-tickets .view-tickets-btn {
        display: block;
        margin: 10px auto 0;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.participant-card {
    animation: slideIn 0.5s ease forwards;
}

/* Human Icon Fallback */
.participant-avatar img[src*="d=mp"] {
    position: relative;
}

/* Hover Effects */
.participant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.participant-card:hover::before {
    transform: scaleX(1);
}

.close-tickets-btn {
    background: none;
    border: none;
    color: gray;
    outline: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.close-tickets-btn:hover {
    opacity: 1;
}

.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}