/* Interactive Features CSS - Stock Emoji Reactions & Quick Insights */

/* Stock Emoji Reactions */
.emoji-reaction-container {
    position: relative;
    display: inline-block;
    margin-left: 0.5rem;
}

.emoji-reaction-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    position: relative;
}

.emoji-reaction-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.emoji-dropdown {
    position: absolute;
    top: -2.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    border-radius: 1rem;
    padding: 0.5rem;
    display: none;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.emoji-dropdown.show {
    display: block;
    animation: emoji-appear 0.3s ease;
}

@keyframes emoji-appear {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.emoji-option {
    display: inline-block;
    font-size: 1.5rem;
    padding: 0.25rem;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
    margin: 0 0.1rem;
}

.emoji-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.2);
}

.emoji-reaction-btn.reacted {
    animation: emoji-bounce 0.6s ease;
}

@keyframes emoji-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* Quick Insights Tooltip */
.quick-insights-trigger {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
    transition: border-color 0.3s ease;
}

.quick-insights-trigger:hover {
    border-bottom-color: var(--bs-primary);
}

.quick-insights-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 40, 0.95) 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.75rem;
    font-size: 0.85rem;
    line-height: 1.4;
    min-width: 250px;
    max-width: 350px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.quick-insights-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 0.5rem solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
}

.quick-insights-trigger:hover .quick-insights-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.insight-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem 0;
}

.insight-item:last-child {
    margin-bottom: 0;
}

.insight-icon {
    font-size: 1rem;
    margin-right: 0.5rem;
    min-width: 1.2rem;
}

.insight-text {
    flex: 1;
}

.insight-value {
    font-weight: bold;
    color: var(--bs-info);
    margin-left: 0.5rem;
}

/* Fun loading animations for insights */
.insight-loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--bs-primary);
    animation: insight-spin 1s linear infinite;
}

@keyframes insight-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Trending stock card enhancements */
.trending-stock-card {
    position: relative;
    transition: all 0.3s ease;
}

.trending-stock-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.stock-metric-hover {
    position: relative;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .quick-insights-tooltip {
        min-width: 200px;
        max-width: 280px;
        font-size: 0.8rem;
    }
    
    .emoji-dropdown {
        padding: 0.3rem;
    }
    
    .emoji-option {
        font-size: 1.3rem;
        margin: 0 0.05rem;
    }
}

/* Animation for metric hover effects */
.metric-highlight {
    animation: metric-glow 1.5s ease-in-out;
}

@keyframes metric-glow {
    0%, 100% {
        box-shadow: none;
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 123, 255, 0.5);
    }
}

/* Stock card emoji reaction display */
.stock-reaction-display {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.stock-reaction-display:hover {
    opacity: 1;
}

/* Quick action buttons */
.quick-action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.quick-action-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}