/**
 * Forum4 Active Users - Frontend Styles
 */

/* ========================================
   BASE STYLES
   ======================================== */

.forum4-active-users {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.3s ease;
}

.forum4-active-users:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* ========================================
   ICON
   ======================================== */

.active-users-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.active-users-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ========================================
   CONTENT
   ======================================== */

.active-users-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.active-users-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.9;
}

.active-users-count {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.count-number {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

/* Count-up animation */
.forum4-active-users.animated .count-number {
    transition: all 0.5s ease;
}

.forum4-active-users.counting-up .count-number {
    animation: countUp 0.5s ease-out;
}

@keyframes countUp {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ========================================
   STATUS INDICATOR
   ======================================== */

.active-users-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    opacity: 0.8;
}

.status-indicator {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.status-text {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   STYLE VARIANTS
   ======================================== */

/* MINIMAL STYLE */
.forum4-active-users-minimal {
    background: #f8fafc;
    color: #1e293b;
    border: 2px solid #e2e8f0;
    padding: 8px 16px;
}

.forum4-active-users-minimal:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.forum4-active-users-minimal .active-users-icon {
    background: #e0e7ff;
    width: 32px;
    height: 32px;
}

.forum4-active-users-minimal .active-users-icon svg {
    color: #667eea;
}

.forum4-active-users-minimal .count-number {
    color: #667eea;
    font-size: 20px;
}

.forum4-active-users-minimal .active-users-label,
.forum4-active-users-minimal .status-text {
    color: #64748b;
}

/* BADGE STYLE */
.forum4-active-users-badge {
    background: #1e293b;
    padding: 6px 12px;
    border-radius: 20px;
    gap: 8px;
}

.forum4-active-users-badge .active-users-icon {
    width: 24px;
    height: 24px;
    background: rgba(102, 126, 234, 0.3);
}

.forum4-active-users-badge .active-users-icon svg {
    width: 16px;
    height: 16px;
}

.forum4-active-users-badge .count-number {
    font-size: 16px;
}

.forum4-active-users-badge .active-users-label,
.forum4-active-users-badge .active-users-status {
    display: none;
}

/* FLOATING STYLE */
.forum4-active-users.floating-top-right {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.forum4-active-users.floating-top-left {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.forum4-active-users.floating-bottom-right {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.forum4-active-users.floating-bottom-left {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .forum4-active-users {
        padding: 10px 16px;
        gap: 10px;
    }
    
    .active-users-icon {
        width: 32px;
        height: 32px;
    }
    
    .active-users-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .count-number {
        font-size: 20px;
    }
    
    .active-users-label {
        font-size: 10px;
    }
    
    /* Adjust floating position on mobile */
    .forum4-active-users[class*="floating-"] {
        top: 10px;
        right: 10px;
        left: auto;
        bottom: auto;
    }
}

/* ========================================
   LOADING STATE
   ======================================== */

.forum4-active-users.loading .count-number {
    animation: loadingPulse 1.5s ease-in-out infinite;
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ========================================
   WIDGET SPECIFIC
   ======================================== */

.widget .forum4-active-users {
    width: 100%;
    justify-content: space-between;
}

.widget .forum4-active-users-minimal {
    background: transparent;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 0;
    padding: 16px 0;
}

.widget .forum4-active-users-minimal:hover {
    background: transparent;
    transform: none;
}
