/* ============================================================================
 * Gamification System CSS — Phase 1: Follow Button
 * Site: Balada G4 (dark theme)
 * ============================================================================ */

/* ============================================================================
 * FOLLOW BUTTON — AJAX toggle button for following DJs
 * ============================================================================ */

.g4-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid #FF4500;
    border-radius: 50px;
    background: transparent;
    color: #FF4500;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
}

.g4-follow-btn:hover {
    background: rgba(255, 69, 0, 0.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.25);
}

.g4-follow-btn:active {
    transform: translateY(0);
}

/* Following state — filled button */
.g4-follow-btn.g4-following {
    background: #FF4500;
    color: #fff;
    border-color: #FF4500;
}

.g4-follow-btn.g4-following:hover {
    background: #cc3700;
    border-color: #cc3700;
    box-shadow: 0 4px 15px rgba(255, 69, 0, 0.3);
}

/* Hover state when already following — show "unfollow" hint */
.g4-follow-btn.g4-following:hover .g4-follow-text::after {
    content: ' ✕';
    font-size: 11px;
}

/* Loading state — during toggle action */
.g4-follow-btn.g4-loading {
    opacity: 0.7;
    pointer-events: none;
}

.g4-follow-btn.g4-loading .g4-follow-text::after {
    content: '...';
}

/* Initial loading state — while fetching follow status via AJAX on page load */
.g4-follow-btn.g4-follow-init-loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
    overflow: hidden;
}

.g4-follow-btn.g4-follow-init-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 69, 0, 0.15),
        transparent
    );
    animation: g4-follow-shimmer 1.5s infinite;
}

@keyframes g4-follow-shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Follower count badge inside button — REMOVED (count shown in stats row instead) */

/* Login prompt button — styled differently */
.g4-follow-btn-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1;
    user-select: none;
    white-space: nowrap;
}

.g4-follow-btn-login:hover {
    border-color: #FF4500;
    color: #FF4500;
    background: rgba(255, 69, 0, 0.1);
}


/* ============================================================================
 * STAT PILLS — Standalone pills visible to ALL visitors (stats row)
 * ============================================================================ */

.g4-follower-count-standalone,
.g4-plays-count-standalone,
.g4-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.g4-follower-count-standalone i,
.g4-plays-count-standalone i,
.g4-stat-pill i {
    font-size: 14px;
    opacity: 0.7;
}

.g4-follower-count-standalone .g4-follower-number {
    font-weight: 700;
    color: #FF4500;
}

.g4-plays-count-standalone .g4-plays-number {
    font-weight: 700;
    color: #FF4500;
}

.g4-stat-pill .g4-stat-number {
    font-weight: 700;
    color: #FF4500;
}

/* ============================================================================
 * FOLLOW BUTTON & STATS — Responsive
 * ============================================================================ */

/* Ensure stats row wraps nicely + breathing room from follow button */
.modern-artist-stats {
    flex-wrap: wrap;
    margin-top: 18px;
    gap: 0.8rem;
}

/* Small bottom margin on actions row for extra separation */
.modern-artist-actions {
    margin-bottom: 4px;
}

@media screen and (max-width: 768px) {
    .g4-follow-btn,
    .g4-follow-btn-login {
        padding: 8px 16px;
        font-size: 13px;
    }

    .g4-follower-count-standalone,
    .g4-plays-count-standalone,
    .g4-stat-pill {
        padding: 4px 10px;
        font-size: 12px;
    }

    .g4-stat-pill i,
    .g4-follower-count-standalone i,
    .g4-plays-count-standalone i {
        font-size: 12px;
    }
}

/* ============================================================================
 * TOAST NOTIFICATIONS — Generic toast for AJAX feedback
 * ============================================================================ */

.g4-toast {
    position: fixed;
    bottom: 90px;
    right: 20px;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    border-left: 4px solid #FF4500;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    max-width: 320px;
}

.g4-toast.g4-toast-visible {
    opacity: 1;
    transform: translateY(0);
}

.g4-toast.g4-toast-success {
    border-left-color: #00c853;
}

.g4-toast.g4-toast-error {
    border-left-color: #ff1744;
}
