/* Platform Toggle Component - Stock/Shipping Switcher */

.platform-switcher {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 0 20px;
}

.platform-toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 25px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.platform-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    white-space: nowrap;
}

.platform-toggle-btn:hover {
    color: rgba(255, 255, 255, 0.8);
}

.platform-toggle-btn.active {
    background: linear-gradient(135deg, var(--platform-color-1, #667eea) 0%, var(--platform-color-2, #764ba2) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.platform-toggle-btn .icon {
    font-size: 16px;
}

/* Stock platform colors */
.platform-toggle-btn.stock-btn.active {
    --platform-color-1: #667eea;
    --platform-color-2: #764ba2;
}

/* Shipping platform colors - Ocean/Maritime theme */
.platform-toggle-btn.shipping-btn.active {
    --platform-color-1: #0891b2;
    --platform-color-2: #0e7490;
    box-shadow: 0 4px 15px rgba(8, 145, 178, 0.4);
}

/* Platform indicator dot */
.platform-indicator {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}

.platform-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

/* Adjust main content to account for platform switcher */
body.has-platform-switcher #top-bar {
    top: 45px;
}

body.has-platform-switcher #container {
    margin-top: 115px; /* 45px switcher + 70px top-bar */
    height: calc(100vh - 115px);
}

body.has-platform-switcher #performance-table {
    top: 135px;
}

/* For shipping pages - different styling */
body.shipping-platform .platform-toggle-btn.shipping-btn.active {
    --platform-color-1: #0891b2;
    --platform-color-2: #0e7490;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .platform-switcher {
        height: 40px;
        padding: 0 10px;
    }
    
    .platform-toggle-btn {
        padding: 6px 14px;
        font-size: 12px;
    }
    
    .platform-toggle-btn .icon {
        font-size: 14px;
    }
    
    .platform-indicator {
        display: none;
    }
}

