/* EngageAI Frontend Styles */

/* BuddyBoss Activity Integration */
.activity-list .activity-item.engageai-automated {
    border-left: 3px solid #2271b1;
    background: rgba(34, 113, 177, 0.02);
}

.activity-item.engageai-automated .activity-header:before {
    content: "\f155";
    font-family: "dashicons";
    color: #2271b1;
    margin-right: 5px;
    font-size: 16px;
}

/* Welcome Messages */
.engageai-welcome-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    position: relative;
    overflow: hidden;
}

.engageai-welcome-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/><circle cx="20" cy="20" r="1" fill="white" opacity="0.1"/><circle cx="80" cy="30" r="1.5" fill="white" opacity="0.1"/><circle cx="30" cy="80" r="1" fill="white" opacity="0.1"/><circle cx="70" cy="70" r="1.5" fill="white" opacity="0.1"/></svg>') repeat;
    pointer-events: none;
}

.engageai-welcome-message .welcome-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.engageai-welcome-message .welcome-icon {
    font-size: 24px;
    opacity: 0.9;
}

.engageai-welcome-message .welcome-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.engageai-welcome-message .welcome-content {
    position: relative;
    z-index: 1;
    line-height: 1.6;
}

.engageai-welcome-message .welcome-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 14px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

/* Discussion Prompts */
.engageai-discussion-prompt {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
    position: relative;
    overflow: hidden;
}

.engageai-discussion-prompt::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.engageai-discussion-prompt .prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.engageai-discussion-prompt .prompt-icon {
    font-size: 28px;
    opacity: 0.9;
}

.engageai-discussion-prompt .prompt-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.engageai-discussion-prompt .prompt-content {
    font-size: 16px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.engageai-discussion-prompt .prompt-cta {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 15px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

/* Motivational Content */
.engageai-motivational-content {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 25px 0;
    text-align: center;
    box-shadow: 0 6px 20px rgba(79, 172, 254, 0.3);
    position: relative;
    overflow: hidden;
}

.engageai-motivational-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

.engageai-motivational-content .motivational-header {
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.engageai-motivational-content .motivational-day {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.engageai-motivational-content .motivational-quote {
    font-size: 24px;
    font-weight: 300;
    line-height: 1.4;
    font-style: italic;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.engageai-motivational-content .quote-marks {
    font-size: 40px;
    opacity: 0.3;
    line-height: 1;
}

.engageai-motivational-content .quote-author {
    font-size: 16px;
    font-weight: 500;
    margin-top: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.engageai-motivational-content .motivational-cta {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 15px;
    position: relative;
    z-index: 1;
}

/* Thread Revival */
.engageai-thread-revival {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    margin: 15px 0;
    position: relative;
}

.engageai-thread-revival .revival-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.engageai-thread-revival .revival-icon {
    font-size: 22px;
    opacity: 0.9;
}

.engageai-thread-revival .revival-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.engageai-thread-revival .revival-content {
    line-height: 1.6;
}

/* Engagement Indicators */
.engageai-engagement-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(34, 113, 177, 0.1);
    color: #2271b1;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.engageai-engagement-indicator .indicator-icon {
    font-size: 14px;
}

/* Gamification Elements */
.engageai-points-earned {
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #8b7d00;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 5px 0;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.3);
}

.engageai-badge-earned {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 15px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    box-shadow: 0 3px 6px rgba(255, 107, 107, 0.3);
    animation: badgeEarned 0.5s ease-out;
}

@keyframes badgeEarned {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Activity Feed Enhancements */
.activity-list .activity-item.engageai-automated .activity-content {
    position: relative;
}

.activity-list .activity-item.engageai-automated .activity-content::after {
    content: attr(data-automation-type);
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(34, 113, 177, 0.8);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-list .activity-item.engageai-automated:hover .activity-content::after {
    opacity: 1;
}

/* Group Welcome Banners */
.group-header .engageai-welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center;
}

.group-header .welcome-banner-text {
    font-size: 16px;
    margin: 0;
}

/* Loading States */
.engageai-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.engageai-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .engageai-welcome-message,
    .engageai-discussion-prompt,
    .engageai-motivational-content,
    .engageai-thread-revival {
        padding: 15px;
        margin: 10px 0;
    }
    
    .engageai-motivational-content .motivational-quote {
        font-size: 20px;
    }
    
    .engageai-discussion-prompt .prompt-title {
        font-size: 18px;
    }
    
    .engageai-welcome-message .welcome-title {
        font-size: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .activity-item.engageai-automated {
        background: rgba(34, 113, 177, 0.1);
    }
    
    .engageai-engagement-indicator {
        background: rgba(34, 113, 177, 0.2);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .engageai-welcome-message,
    .engageai-discussion-prompt,
    .engageai-motivational-content,
    .engageai-thread-revival {
        border: 2px solid #000;
    }
    
    .engageai-points-earned,
    .engageai-badge-earned {
        border: 1px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .engageai-spinner,
    .engageai-badge-earned {
        animation: none;
    }
    
    .activity-item.engageai-automated .activity-content::after {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .engageai-welcome-message,
    .engageai-discussion-prompt,
    .engageai-motivational-content,
    .engageai-thread-revival {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .engageai-points-earned,
    .engageai-badge-earned {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}

/* Accessibility Enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Focus Indicators */
.engageai-welcome-message:focus,
.engageai-discussion-prompt:focus,
.engageai-motivational-content:focus,
.engageai-thread-revival:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Interaction States */
.engageai-welcome-message:hover,
.engageai-discussion-prompt:hover,
.engageai-motivational-content:hover,
.engageai-thread-revival:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Success/Error States */
.engageai-message.success {
    border-left-color: #46b450;
}

.engageai-message.error {
    border-left-color: #dc3232;
}

.engageai-message.warning {
    border-left-color: #ffb900;
}

/* Custom Scrollbar for Activity Feed */
.activity-list::-webkit-scrollbar {
    width: 8px;
}

.activity-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.activity-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.activity-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}