/**
 * HelpMap Core Plugin Styles
 * Additional styles for plugin functionality
 */

/* Notification Styles */
.helpmapp-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.helpmapp-notification.show {
    transform: translateX(0);
}

.helpmapp-notification.success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.helpmapp-notification.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.helpmapp-notification.info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.helpmapp-notification.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

/* User Follow Button */
.helpmapp-follow-btn {
    position: relative;
    overflow: hidden;
}

.helpmapp-follow-btn.loading {
    pointer-events: none;
}

.helpmapp-follow-btn.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

/* Achievement Badges */
.helpmapp-achievement {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
    animation: achievementPop 0.6s ease-out;
}

@keyframes achievementPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Premium Features */
.helpmapp-premium-feature {
    position: relative;
}

.helpmapp-premium-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    border-radius: inherit;
    pointer-events: none;
}

.helpmapp-premium-lock {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

/* User Score Display */
.helpmapp-user-score {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.helpmapp-user-score i {
    margin-right: 4px;
}

/* Problem Status Indicators */
.helpmapp-status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.helpmapp-status-indicator.open {
    background: #dbeafe;
    color: #1e40af;
}

.helpmapp-status-indicator.in-progress {
    background: #fef3c7;
    color: #d97706;
}

.helpmapp-status-indicator.resolved {
    background: #d1fae5;
    color: #059669;
}

.helpmapp-status-indicator.closed {
    background: #f3f4f6;
    color: #6b7280;
}

/* Loading States */
.helpmapp-loading {
    position: relative;
    overflow: hidden;
}

.helpmapp-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Search Results */
.helpmapp-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 400px;
    overflow-y: auto;
}

.helpmapp-search-result {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.helpmapp-search-result:hover {
    background-color: #f9fafb;
}

.helpmapp-search-result:last-child {
    border-bottom: none;
}

.helpmapp-search-result-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.helpmapp-search-result-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.4;
}

.helpmapp-search-result-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

/* User Profile Enhancements */
.helpmapp-user-profile {
    position: relative;
}

.helpmapp-user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.helpmapp-user-stat {
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.helpmapp-user-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.helpmapp-user-stat-label {
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .helpmapp-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .helpmapp-user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .helpmapp-search-results {
        position: fixed;
        top: 60px;
        left: 10px;
        right: 10px;
        max-height: 300px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .helpmapp-search-results {
        background: #1f2937;
        border-color: #374151;
    }
    
    .helpmapp-search-result {
        border-bottom-color: #374151;
    }
    
    .helpmapp-search-result:hover {
        background-color: #374151;
    }
    
    .helpmapp-search-result-title {
        color: #f9fafb;
    }
    
    .helpmapp-search-result-excerpt {
        color: #d1d5db;
    }
    
    .helpmapp-search-result-meta {
        color: #9ca3af;
    }
    
    .helpmapp-user-stat {
        background: #374151;
    }
    
    .helpmapp-user-stat-value {
        color: #f9fafb;
    }
    
    .helpmapp-user-stat-label {
        color: #d1d5db;
    }
}

/* Animation Classes */
.helpmapp-fade-in {
    animation: fadeIn 0.3s ease-out;
}

.helpmapp-slide-up {
    animation: slideUp 0.3s ease-out;
}

.helpmapp-bounce {
    animation: bounce 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        transform: translate3d(0, -8px, 0);
    }
    70% {
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}
