﻿/* wwwroot/css/trading-layout.css */

.trading-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Syncfusion Toolbar Customization */
.main-toolbar.e-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 16px;
    min-height: 56px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    z-index: 100;
    position: relative;
}

.main-toolbar .e-toolbar-items {
    gap: 8px;
}

.main-toolbar .e-separator {
    background-color: #d0d0d0;
    height: 32px;
    margin: 0 8px;
}

/* Toolbar Title */
.toolbar-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
    padding: 0 12px;
}

    .toolbar-title strong {
        color: #1976d2;
    }

/* Toolbar Buttons */
.toolbar-btn {
    background: #fff;
    border: 1px solid #d0d0d0;
    color: #555;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
}

    .toolbar-btn:hover {
        background: #f0f0f0;
        border-color: #b0b0b0;
    }

    .toolbar-btn.active {
        background: #1976d2;
        border-color: #1976d2;
        color: white;
        font-weight: 500;
    }

    .toolbar-btn i {
        font-size: 13px;
    }

/* Button Groups */
.btn-group {
    display: flex;
    gap: 4px;
}

.timeframe-group {
    gap: 2px;
}

    .timeframe-group .toolbar-btn {
        min-width: 50px;
    }

.toolbar-right-group {
    display: flex;
    gap: 6px;
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Menu Panel - Toggle sidebar (push mode) */
/* Width and visibility are controlled by iframe-responsive.css */
.menu-panel {
    display: flex;
    flex-direction: column;
    background-color: #f8f9fa;
    height: 100%;
    position: relative;
}

.menu-body {
    flex: 1;
    overflow: hidden;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* Chart Panel */
.chart-panel {
    flex: 1;
    background-color: #1e222d;
    overflow: hidden;
}

/* TradingView Placeholder */
.tradingview-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    color: #d1d4dc;
}

.chart-header {
    background: #2a2e39;
    padding: 15px 20px;
    border-bottom: 1px solid #3a3e49;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.chart-info h4 {
    color: #fff;
    margin: 0 0 5px 0;
    font-size: 18px;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.price {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
}

.change {
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 4px;
}

    .change.positive {
        color: #26a69a;
        background: rgba(38, 166, 154, 0.1);
    }

    .change.negative {
        color: #ef5350;
        background: rgba(239, 83, 80, 0.1);
    }

.chart-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 11px;
    color: #787b86;
    margin-bottom: 2px;
}

.stat-value {
    font-size: 13px;
    color: #d1d4dc;
    font-weight: 500;
}

/* Chart Canvas */
.chart-canvas {
    flex: 1;
    position: relative;
    background: #1e222d;
    overflow: hidden;
}

.placeholder-grid {
    position: relative;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, #2a2e39 1px, transparent 1px), linear-gradient(90deg, #2a2e39 1px, transparent 1px);
    background-size: 50px 50px;
}

.candlestick-placeholder {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 90%;
    height: 60%;
    opacity: 0.8;
}

.placeholder-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #787b86;
    pointer-events: none;
}

    .placeholder-text i {
        color: #4a4e5a;
    }

/* Chart Footer */
.chart-footer {
    background: #2a2e39;
    padding: 10px 20px;
    border-top: 1px solid #3a3e49;
    flex-shrink: 0;
}

.volume-bar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.volume-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 40px;
}

.volume-item {
    width: 8px;
    background: #ef5350;
    opacity: 0.6;
    transition: opacity 0.2s;
}

    .volume-item.green {
        background: #26a69a;
    }

    .volume-item:hover {
        opacity: 1;
    }

/* Welcome Chart */
.welcome-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #787b86;
}

    .welcome-chart h3 {
        color: #d1d4dc;
        margin-bottom: 10px;
    }

/* Responsive */
@media (max-width: 1400px) {
    /* Keep all elements visible but more compact */
    .timeframe-group .toolbar-btn {
        min-width: 42px;
    }
}

@media (max-width: 1200px) {
    /* Menu panel toggle mode is handled by iframe-responsive.css */
    .chart-panel {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .main-toolbar.e-toolbar {
        padding: 6px 10px;
        min-height: 48px;
    }

    .toolbar-title {
        font-size: 13px;
    }

    .toolbar-btn {
        padding: 5px 8px;
        font-size: 12px;
        min-height: 28px;
    }

    /* Keep horizontal layout */
    .content-wrapper {
        flex-direction: row;
    }

    .chart-panel {
        flex: 1;
        min-width: 0;
    }
}

@media (max-width: 576px) {
    .main-toolbar.e-toolbar {
        padding: 4px 8px;
        min-height: 40px;
    }

    .toolbar-btn {
        padding: 4px 6px;
        font-size: 11px;
        min-height: 26px;
    }
}
