/* Low Float Report - Custom CSS - Inspired by classic Low Float design */

/* Global Cousine font application */
* {
    font-family: "Cousine", monospace;
}

/* Clean white background consistent with original site */
body {
    background-color: #ffffff;
    color: #000000;
    font-family: "Cousine", monospace;
}

/* Header styling inspired by original */
.header {
    font-family: "Cousine", monospace;
    padding: 10px 10px;
    background: #ffffff;
    color: #000000;
    transition: 0.10s;
    box-shadow: 1px 1px 1px 1px rgba(0,0,0,0);
}

/* Clean table styling matching original */
.newspaper-table {
    font-family: "Cousine", monospace;
    border-collapse: separate;
    border-spacing: 5px;
    border-style: none;
    width: 100%;
    text-align: left;
    table-layout: fixed;
    margin-left: auto;
    margin-right: auto;
    background-color: #ffffff;
}

.newspaper-table th {
    background-color: #ffffff;
    color: #000000;
    font-weight: bold;
    font-size: 125%;
    text-transform: capitalize;
    cursor: pointer;
    transition: background-color 0.10s ease;
    user-select: none;
    padding: 5px;
    border-bottom: 1px solid #ddd;
    text-align: left;
    font-family: "Cousine", monospace;
}

.newspaper-table th:hover {
    background-color: #f9f9f9;
}

.newspaper-table th .sort-indicator {
    transition: color 0.2s ease;
    opacity: 0.6;
}

.newspaper-table th:hover .sort-indicator {
    opacity: 1;
}

.newspaper-table td {
    background-color: #ffffff;
    color: #000000;
    border-bottom: 1px solid #ddd;
    padding: 5px;
    font-size: 100%;
    font-weight: 100;
    text-align: left;
    word-wrap: break-word;
    font-family: "Cousine", monospace;
}

.newspaper-table tr:hover {
    background-color: #f9f9f9;
}

/* Grid container styling inspired by original */
.grid-container {
    display: inline-grid;
    grid-template-columns: auto auto auto auto;
    background-color: #ffffff;
    padding-left: 20px;
    padding-right: 20px;
    align-content: space-evenly;
    grid-auto-flow: row;
    grid-gap: 50px;
    font-family: "Cousine", monospace;
    text-align: left;
}

.grid-item {
    background-color: #ffffff;
    border: 0px solid black;
    padding: 0px;
    font-size: 14px;
    font-family: "Cousine", monospace;
    text-align: left;
}

/* Link styling consistent with original */
a:link {
    color: #000000;
    text-decoration: none;
}

a:visited {
    color: #000000;
}

a:hover {
    color: #000000;
}

a:active {
    color: #0000ff;
}

/* Typography matching original */
p {
    font-family: "Cousine", monospace;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Cousine", monospace;
    font-weight: bold;
}

/* Custom scrollbar for tables */
.overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.overflow-x-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overflow-x-auto::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
.loading {
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Mobile grid adjustments inspired by original responsive design */
    .grid-cols-1 {
        grid-template-columns: 1fr;
    }
    
    .text-3xl {
        font-size: 1.5rem;
    }
    
    table {
        font-size: 0.75rem;
    }
    
    .grid-container {
        grid-column: 1;
        display: inline-grid;
        background-color: #ffffff;
        padding: 20px;
        align-content: space-evenly;
        grid-auto-flow: row;
        grid-gap: 10px;
    }
    
    .grid-item {
        grid-column: 1;
        padding: 0px;
    }
    
    .marquee {
        animation-duration: 20s;
    }
}

/* Print styles */
@media print {
    .fixed {
        display: none;
    }
    
    table, th, td {
        border: none !important;
        font-family: "Cousine", monospace !important;
    }
    
    .bg-white {
        background: #ffffff !important;
        color: #000000 !important;
    }
}

/* Smooth scrolling inspired by original */
html {
    scroll-behavior: smooth;
}

/* Button styling consistent with original clean design */
button {
    font-family: "Cousine", monospace;
    transition: 0.10s;
}

/* Input and select styling */
input, select {
    font-family: "Cousine", monospace;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --bg-primary: #ffffff;
        --text-primary: #000000;
        --border-color: #000000;
    }
    
    .bg-gray-50 {
        background-color: #ffffff;
    }
    
    .bg-gray-100 {
        background-color: #f0f0f0;
    }
}

/* Market Report Ticker Links */
.ticker-link {
    font-family: "Cousine", monospace;
    font-weight: bold;
    color: #1e40af; /* Blue-700 */
    text-decoration: none;
    transition: all 0.2s ease;
    padding: 1px 2px;
    border-radius: 2px;
}

.ticker-link:hover {
    color: #1e3a8a; /* Blue-800 */
    text-decoration: underline;
    background-color: #f0f9ff; /* Blue-50 */
}

.ticker-link:visited {
    color: #6b21a8; /* Purple-700 */
}

.ticker-link:visited:hover {
    color: #581c87; /* Purple-800 */
}

/* Market Report Date/Time Formatting */
.market-report-text strong {
    font-family: "Cousine", monospace;
    font-weight: bold;
    color: #374151; /* Gray-700 */
}

/* Market Report Content Container */
.market-report-text {
    font-family: "Cousine", monospace;
    line-height: 1.6;
    color: #000000;
}

.market-report-text p {
    margin-bottom: 1rem;
    text-align: justify;
}

.market-report-text br {
    line-height: 1.2;
}

/* Hot Tickers Fade In/Out Styles */
@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}

.ticker-fade {
    animation: fadeInOut 4s ease-in-out;
    opacity: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hot-tickers-container {
    background: linear-gradient(90deg, #000000 0%, #1a1a1a 50%, #000000 100%);
}

.ticker-display {
    color: white;
    font-family: 'Cousine', monospace;
    text-align: center;
    padding: 1rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    overflow: visible;
}

.ticker-symbol-large {
    font-size: 1.8em;
    font-weight: bold;
    margin-bottom: 0.25rem;
    color: white;
}

.ticker-stats-line {
    font-size: 1.25em;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    color: white;
}

.ticker-stat {
    color: white;
}

.ticker-records {
    font-size: 0.85em;
    margin-bottom: 0.25rem;
    opacity: 0.9;
    color: white;
}

.ticker-news-headline {
    font-size: 1.25em;
    font-weight: bold;
    text-align: center;
    line-height: 1.2;
    width: 100%;
    color: white;
    margin: 0rem 0;
    padding: 0rem;
}

.ticker-field {
    margin: 0 1rem;
    white-space: nowrap;
}

.loading-fade {
    color: white;
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.5; }
}

/* Breaking Alert Bar Styles */
.breaking-alert-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-bottom: 2px solid #0f3460;
    color: #ffffff;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-family: "Cousine", monospace;
}

.breaking-alert-bar.active {
    transform: translateY(0);
}

.breaking-ticker {
    color: #4CAF50;
    font-weight: bold;
    margin: 0 5px;
}

.breaking-pulse {
    animation: gentle-pulse 2s ease-in-out infinite;
    margin-right: 8px;
}

.breaking-timer {
    float: right;
    font-size: 12px;
    opacity: 0.8;
    color: #cccccc;
}

@keyframes gentle-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Chevron pulse animation for notifications */
.animate-pulse {
    animation: chevron-pulse 1.5s ease-in-out infinite;
}

@keyframes chevron-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.6; 
        transform: scale(1.2);
    }
}

/* Adjust body padding when alert is active */
body.breaking-alert-active {
    padding-top: 44px;
    transition: padding-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile responsiveness for breaking alert */
@media (max-width: 768px) {
    .breaking-alert-bar {
        padding: 8px 15px;
        font-size: 13px;
    }
    
    .breaking-timer {
        display: none; /* Hide time ago on mobile to save space */
    }
    
    body.breaking-alert-active {
        padding-top: 38px;
    }
}

/* ==============================================
   TICKER INTELLIGENCE INDICATORS
   ============================================== */

/* Base ticker intelligence styling */
.ticker-with-intelligence {
    position: relative;
    display: inline-block;
    font-weight: bold;
}

.intelligence-badge {
    margin-left: 2px;
    font-size: 0.8em;
    vertical-align: super;
}

/* Hall of Fame - Gold border with crown */
.ticker-hall-of-fame {
    border: 2px solid #FFD700;
    border-radius: 4px;
    padding: 1px 3px;
    background: linear-gradient(45deg, #FFF8DC, #FFFACD);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
    animation: hall-of-fame-glow 2s infinite alternate;
}

@keyframes hall-of-fame-glow {
    0% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); }
    100% { box-shadow: 0 0 12px rgba(255, 215, 0, 0.6); }
}

/* Hot Streak - Red/Orange pulse */
.ticker-hot-streak {
    border: 2px solid #FF4500;
    border-radius: 4px;
    padding: 1px 3px;
    background: linear-gradient(45deg, #FFEBE6, #FFF0E6);
    animation: hot-streak-pulse 1.5s infinite;
}

@keyframes hot-streak-pulse {
    0% { 
        border-color: #FF4500;
        background: linear-gradient(45deg, #FFEBE6, #FFF0E6);
    }
    50% { 
        border-color: #FF6347;
        background: linear-gradient(45deg, #FFF0E6, #FFEBE6);
    }
    100% { 
        border-color: #FF4500;
        background: linear-gradient(45deg, #FFEBE6, #FFF0E6);
    }
}

/* Recent Breaker - Blue underline with subtle glow */
.ticker-recent-breaker {
    border-bottom: 2px solid #1E90FF;
    padding-bottom: 1px;
    background: linear-gradient(to bottom, transparent 70%, rgba(30, 144, 255, 0.1) 100%);
    transition: all 0.3s ease;
}

.ticker-recent-breaker:hover {
    border-bottom-color: #4169E1;
    background: linear-gradient(to bottom, transparent 60%, rgba(30, 144, 255, 0.2) 100%);
}

/* Intelligence tooltip enhancement */
.ticker-with-intelligence[title]:hover {
    cursor: help;
}

/* Make intelligence indicators work well in dark mode if needed */
@media (prefers-color-scheme: dark) {
    .ticker-hall-of-fame {
        background: linear-gradient(45deg, rgba(255, 248, 220, 0.1), rgba(255, 250, 205, 0.1));
    }
    
    .ticker-hot-streak {
        background: linear-gradient(45deg, rgba(255, 235, 230, 0.1), rgba(255, 240, 230, 0.1));
    }
    
    .ticker-recent-breaker {
        background: linear-gradient(to bottom, transparent 70%, rgba(30, 144, 255, 0.15) 100%);
    }
}

/* Compact mode for small spaces */
.intelligence-compact .ticker-with-intelligence {
    font-size: 0.9em;
}

.intelligence-compact .intelligence-badge {
    font-size: 0.7em;
    margin-left: 1px;
}
