/* ========================================
   SITE HEADER STYLES
   TradeSmart.live - Top Fixed Header
   ======================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #000000;
    border-bottom: 1px solid var(--primary);
    display: flex;
    align-items: center;
    z-index: 101;
}

.site-header-content {
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-logo {
    width: 80px;
    height: 45px;
    object-fit: cover;
    object-position: center calc(50% - 1px);
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
}

.site-title {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.title-dot {
    color: var(--white);
}

.title-live {
    color: #ef4444;
    animation: pulseLive 1.5s ease-in-out infinite;
}

@keyframes pulseLive {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Site Header Right - Language Selector */
.site-header {
    justify-content: space-between;
}

.site-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 20px;
}

/* Header Logout Button (Mobile only) */
.header-logout-btn {
    display: none; /* Hidden by default on desktop */
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    color: #ef4444;
    cursor: pointer;
    transition: all 0.2s ease;
}

.header-logout-btn svg {
    width: 18px;
    height: 18px;
}

.header-logout-btn:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: #ef4444;
    color: #f87171;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
}

.lang-btn:hover {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--primary);
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
}

.lang-code {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
}

.lang-selector.open .lang-arrow {
    transform: rotate(180deg);
}

/* Language Dropdown */
.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #111111;
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    padding: 6px;
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lang-selector.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    color: #9ca3af;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-size: 13px;
}

.lang-option:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--white);
}

.lang-option.active {
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary);
}

.lang-option .lang-flag {
    font-size: 18px;
}

.lang-option .lang-name {
    font-weight: 500;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .site-header {
        height: 60px;
    }

    .header-logo {
        width: 65px;
        height: 37px;
    }

    .site-title {
        font-size: 16px;
    }

    .site-header-right {
        padding-right: 12px;
    }

    .lang-btn {
        padding: 5px 8px;
    }

    .lang-code {
        display: none;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .site-header {
        height: 50px;
    }

    .site-header-content {
        padding: 0 12px;
        gap: 3px;
    }

    .header-logo {
        width: 50px;
        height: 28px;
    }

    .site-title {
        font-size: 14px;
    }

    .site-header-right {
        padding-right: 8px;
    }

    /* Show logout button on mobile */
    .header-logout-btn {
        display: flex;
        width: 32px;
        height: 32px;
    }

    .header-logout-btn svg {
        width: 16px;
        height: 16px;
    }

    .lang-btn {
        padding: 4px 6px;
        gap: 4px;
    }

    .lang-flag {
        font-size: 14px;
    }

    .lang-arrow {
        width: 12px;
        height: 12px;
    }

    .lang-dropdown {
        min-width: 120px;
        padding: 4px;
    }

    .lang-option {
        padding: 6px 10px;
        font-size: 12px;
    }

    .lang-option .lang-flag {
        font-size: 16px;
    }
}

/* Small Mobile Responsive */
@media (max-width: 480px) {
    .site-header {
        height: 45px;
    }

    .site-header-content {
        padding: 0 8px;
    }

    .header-logo {
        width: 45px;
        height: 25px;
        border-width: 1px;
    }

    .site-title {
        font-size: 13px;
        letter-spacing: 0;
    }

    .site-header-right {
        padding-right: 6px;
        gap: 8px;
    }

    /* Smaller logout button on small mobile */
    .header-logout-btn {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }

    .header-logout-btn svg {
        width: 14px;
        height: 14px;
    }

    .lang-btn {
        padding: 3px 5px;
        border-radius: 4px;
    }

    .lang-flag {
        font-size: 13px;
    }

    .lang-arrow {
        width: 10px;
        height: 10px;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .site-header {
        height: 40px;
    }

    .header-logo {
        width: 40px;
        height: 22px;
    }

    .site-title {
        font-size: 12px;
    }

    /* Show logout button in landscape mobile */
    .header-logout-btn {
        display: flex;
        width: 26px;
        height: 26px;
        border-radius: 5px;
    }

    .header-logout-btn svg {
        width: 13px;
        height: 13px;
    }

    .lang-btn {
        padding: 3px 5px;
    }

    .lang-flag {
        font-size: 12px;
    }

    .lang-arrow {
        width: 10px;
        height: 10px;
    }
}
