/**
 * ForexSignale Theme Control - Frontend Styles
 * Bloomberg-Style Header + Category Badge
 */

/* ============================
   CSS Variables (Dark Theme Default)
   ============================ */
:root {
    --fxmag-bg-primary: #0a0a0a;
    --fxmag-bg-secondary: #111111;
    --fxmag-bg-tertiary: #1a1a1a;
    --fxmag-text-primary: #ffffff;
    --fxmag-text-secondary: #e0e0e0;
    --fxmag-text-muted: #888888;
    --fxmag-border-color: #222222;
    --fxmag-accent: #f97316;
    --fxmag-success: #22c55e;
    --fxmag-danger: #ef4444;
}

[data-theme="light"] {
    --fxmag-bg-primary: #ffffff;
    --fxmag-bg-secondary: #fafafa;
    --fxmag-bg-tertiary: #f5f5f5;
    --fxmag-text-primary: #1a1a1a;
    --fxmag-text-secondary: #333333;
    --fxmag-text-muted: #666666;
    --fxmag-border-color: #e5e5e5;
}

/* ============================
   Header Container
   ============================ */
.fxmag-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--fxmag-bg-primary);
    border-bottom: 1px solid var(--fxmag-border-color);
}

/* ============================
   Ticker Bar (Top Row)
   ============================ */
.fxmag-ticker-bar {
    background: var(--fxmag-bg-secondary);
    border-bottom: 1px solid var(--fxmag-border-color);
    font-size: 12px;
    overflow: hidden;
    height: 36px;
}

.fxmag-ticker-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* Signals Indicator */
.fxmag-signals-indicator .signals-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--fxmag-text-secondary);
    font-weight: 600;
}

.fxmag-signals-indicator .signals-label {
    color: var(--fxmag-accent);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.05em;
}

.fxmag-signals-indicator .signals-count {
    background: var(--fxmag-accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* Scrollender Ticker Container (Kurse + News zusammen) */
.fxmag-ticker-scroll-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin-left: 15px;
    max-width: calc(100% - 120px);
}

.fxmag-ticker-scroll {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    animation: tickerScroll 45s linear infinite;
    will-change: transform;
}

.fxmag-ticker-scroll:hover {
    animation-play-state: paused;
}

/* Scroll Items (Kurse und News) */
.ticker-scroll-item {
    display: inline-flex;
    align-items: center;
    padding: 0 15px;
    font-size: 12px;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

/* Kurs-Items */
.ticker-scroll-item.ticker-price {
    gap: 6px;
    font-weight: 600;
}

.ticker-scroll-item.ticker-price .ticker-symbol {
    color: var(--fxmag-text-primary);
    font-weight: 700;
}

.ticker-scroll-item.ticker-price .ticker-value {
    color: var(--fxmag-text-secondary);
    font-family: monospace;
}

.ticker-scroll-item.ticker-price .ticker-change {
    font-family: monospace;
}

.ticker-scroll-item.ticker-price.positive .ticker-change {
    color: var(--fxmag-success);
}

.ticker-scroll-item.ticker-price.negative .ticker-change {
    color: var(--fxmag-danger);
}

/* News-Items */
.ticker-scroll-item.ticker-news {
    color: var(--fxmag-text-muted);
    padding: 0 20px;
}

.ticker-scroll-item.ticker-news::before {
    content: '•';
    margin-right: 10px;
    color: var(--fxmag-accent);
}

.ticker-scroll-item.ticker-news:hover {
    color: var(--fxmag-accent);
}

@keyframes tickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   Navigation Bar
   ============================ */
.fxmag-nav-bar {
    background: var(--fxmag-bg-primary);
}

.fxmag-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
}

/* Logo */
.fxmag-logo {
    font-size: 22px;
    font-weight: 800;
    text-decoration: none;
    color: var(--fxmag-text-primary);
    letter-spacing: -0.5px;
}

.fxmag-logo .logo-accent {
    color: var(--fxmag-accent);
}

/* Navigation */
.fxmag-nav {
    display: flex;
    margin-left: 40px;
    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 20px 15px;
    color: var(--fxmag-text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--fxmag-accent);
}

/* Dropdown */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 180px;
    background: var(--fxmag-bg-secondary);
    border: 1px solid var(--fxmag-border-color);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: var(--fxmag-text-secondary);
    text-decoration: none;
    font-size: 13px;
    border-bottom: 1px solid var(--fxmag-border-color);
    transition: all 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: var(--fxmag-bg-tertiary);
    color: var(--fxmag-accent);
}

/* Theme Toggle */
.fxmag-theme-toggle {
    margin-left: auto;
    background: transparent;
    border: 1px solid var(--fxmag-border-color);
    border-radius: 20px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.fxmag-theme-toggle:hover {
    border-color: var(--fxmag-accent);
}

.theme-icon {
    font-size: 16px;
}

/* ============================
   Category Badge
   ============================ */
.fxmag-category-badge {
    display: inline-block;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

/* ============================
   Stock Ticker Box
   ============================ */
.fxmag-stock-ticker-box {
    background: var(--fxmag-bg-secondary);
    border-bottom: 1px solid var(--fxmag-border-color);
}

.stock-ticker-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.stock-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--fxmag-text-muted);
}

.stock-logo {
    font-size: 14px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
}

.stock-logo.positive {
    background: rgba(34, 197, 94, 0.15);
    color: var(--fxmag-success);
}

.stock-logo.negative {
    background: rgba(239, 68, 68, 0.15);
    color: var(--fxmag-danger);
}

.stock-name {
    color: var(--fxmag-text-secondary);
    font-size: 14px;
}

.stock-price {
    font-family: 'JetBrains Mono', monospace;
    font-size: 16px;
    font-weight: 600;
    color: var(--fxmag-text-primary);
}

.stock-change {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    font-weight: 600;
}

.stock-change.positive {
    color: var(--fxmag-success);
}

.stock-change.negative {
    color: var(--fxmag-danger);
}

.stock-time {
    margin-left: auto;
    font-size: 11px;
    color: var(--fxmag-text-muted);
}

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 1000px) {
    .fxmag-nav-inner {
        flex-wrap: wrap;
        height: auto;
        padding: 10px 15px;
    }

    .fxmag-nav {
        width: 100%;
        order: 3;
        margin-left: 0;
        margin-top: 10px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
    }

    .fxmag-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        padding: 10px 12px;
        font-size: 11px;
        white-space: nowrap;
    }

    .nav-dropdown {
        display: none !important;
    }

    .fxmag-ticker-inner {
        padding: 6px 15px;
    }

    .fxmag-news-ticker {
        display: none;
    }

    .fxmag-theme-toggle {
        order: 2;
    }

    .fxmag-logo {
        order: 1;
    }
}

@media (max-width: 768px) {
    .fxmag-ticker-prices {
        gap: 10px;
    }

    .fxmag-nav-inner {
        padding: 8px 12px;
    }

    .fxmag-logo {
        font-size: 18px;
    }

    .nav-link {
        padding: 8px 10px;
        font-size: 10px;
    }

    .stock-ticker-inner {
        padding: 10px 15px;
        gap: 10px;
    }

    .stock-label {
        display: none;
    }

    .stock-time {
        display: none;
    }
}

@media (max-width: 480px) {
    .fxmag-nav {
        margin-top: 8px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 9px;
    }

    .fxmag-logo {
        font-size: 16px;
    }

    .fxmag-theme-toggle {
        padding: 6px 10px;
    }

    .theme-icon {
        font-size: 14px;
    }

    .fxmag-ticker-bar {
        height: auto;
    }

    .fxmag-ticker-inner {
        padding: 5px 10px;
    }
}
