/* StockPulse - Custom Styles */

/* Alpine.js x-cloak - hide elements until Alpine initializes */
[x-cloak] {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

/* Selection styling */
::selection {
    background: rgba(16, 185, 129, 0.3);
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, opacity;
    transition-duration: 150ms;
    transition-timing-function: ease-in-out;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Significance score animations */
@keyframes pulse-emerald {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

.score-high {
    animation: pulse-emerald 2s infinite;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Sentiment gauge */
.sentiment-gauge {
    position: relative;
    height: 8px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #22c55e);
    border-radius: 4px;
    overflow: hidden;
}

.sentiment-gauge::after {
    content: '';
    position: absolute;
    top: -2px;
    width: 4px;
    height: 12px;
    background: white;
    border-radius: 2px;
    transform: translateX(-50%);
    left: var(--sentiment-position, 50%);
}

/* Source indicator dots */
.source-reddit { background-color: #ff4500; }
.source-news { background-color: #3b82f6; }
.source-sec { background-color: #8b5cf6; }
.source-podcast { background-color: #ec4899; }
.source-earnings { background-color: #22c55e; }

/* Card hover effects */
.feed-card {
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.feed-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Mobile optimizations */
@media (max-width: 640px) {
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .score-badge {
        width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    header, footer, .filter-bar {
        display: none;
    }
}
