/**
 * User Statistics Styles for DistroAPI Plugin
 * Modern, responsive styling for user statistics display
 */

/* Base Statistics Container */
.distro-user-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Grid Layout */
.distro-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* List Layout */
.distro-stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Compact Layout */
.distro-stats-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.distro-stats-compact .distro-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #1E73BE;
}

/* Stat Item */
.distro-stat-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid #e1e5e9;
}

.distro-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stat-number {
    font-size: 2.5em;
    font-weight: 700;
    color: #1E73BE;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 0.9em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Status Breakdown */
.distro-status-breakdown {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    width: 100%;
}

.distro-status-breakdown h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.status-name {
    font-weight: 500;
    color: #333;
    text-transform: capitalize;
}

.status-count {
    background: #1E73BE;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Latest Release */
.distro-latest-release {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid #e1e5e9;
    width: 100%;
}

.distro-latest-release h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.1em;
    font-weight: 600;
}

.release-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.release-info strong {
    font-size: 1.1em;
    color: #333;
}

.release-artist {
    color: #666;
    font-style: italic;
}

.release-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status Colors */
.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-in-review {
    background: #e8f4fe;
    color: #42A5F5;
}

.status-ingested {
    background: #f5eaf8;
    color: #AB47BC;
}

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

.status-taken-down {
    background: #f8d7da;
    color: #721c24;
}

.status-incomplete {
    background: #f5f7f8;
    color: #B0BEC5;
}

/* Dashboard Widget Styles */
.distro-dashboard-stats {
    padding: 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    border-left: 3px solid #1E73BE;
}

.stat-card .stat-number {
    font-size: 1.8em;
    font-weight: 700;
    color: #1E73BE;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-breakdown {
    margin-bottom: 20px;
}

.status-breakdown h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}

.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    border-bottom: 1px solid #f1f3f4;
}

.status-row:last-child {
    border-bottom: none;
}

.status-name {
    font-size: 0.9em;
    color: #333;
    text-transform: capitalize;
}

.status-count {
    background: #1E73BE;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 0.7em;
    font-weight: 600;
}

.latest-release {
    margin-bottom: 20px;
}

.latest-release h4 {
    margin: 0 0 10px 0;
    font-size: 1em;
    color: #333;
}

.latest-release p {
    margin: 5px 0;
    font-size: 0.9em;
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
}

.distro-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e1e5e9;
}

/* Responsive Design */
@media (max-width: 768px) {
    .distro-user-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .distro-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .distro-stats-compact {
        flex-direction: column;
        align-items: stretch;
    }
    
    .distro-stats-compact .distro-stat-item {
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-number {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
    .distro-stat-item {
        padding: 15px;
    }
    
    .stat-number {
        font-size: 1.8em;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading States */
.distro-user-stats.loading {
    opacity: 0.6;
    pointer-events: none;
}

.distro-user-stats.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #1E73BE;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.distro-user-stats.error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #f5c6cb;
}

/* Success States */
.distro-user-stats.success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #c3e6cb;
}
