/* chart.css */

/* FIX: Changed selector from .chart-window to the correct ID and added positioning */
#chartWindowContainer {
    display: flex; /* Changed from none to flex by default, JS will toggle the 'hidden' class */
    flex-direction: column;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 600px;
    background-color: #ffffff;
    border: 1px solid #ccc;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden; 
}

#chartWindowContainer.fullscreen {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0;
    z-index: 9999;
    transform: none;
}

.chart-header {
    background-color: #f1f1f1;
    padding: 8px 12px;
    cursor: move;
    border-bottom: 1px solid #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#chartTitle {
    font-weight: bold;
    font-size: 14px;
    color: #333;
}

.chart-controls button {
    background: none;
    border: 1px solid #aaa;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 5px;
    padding: 4px 8px;
    font-size: 12px;
}
.chart-controls button:hover {
    background-color: #e0e0e0;
}

.chart-controls .chart-trade-btn {
    color: white;
    font-weight: bold;
    padding: 4px 12px;
    border: none;
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
}
.chart-controls .chart-trade-btn:hover {
    box-shadow: 0 4px 5px 0 rgba(0,0,0,0.14), 0 1px 10px 0 rgba(0,0,0,0.12), 0 2px 4px -1px rgba(0,0,0,0.2);
}
.chart-controls .chart-trade-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.2);
}

#chartBuyBtn {
    background-color: #1976D2; /* Material Blue */
}
#chartBuyBtn:hover {
    background-color: #1565C0;
}

#chartSellBtn {
    background-color: #D32F2F; /* Material Red */
}
#chartSellBtn:hover {
    background-color: #C62828;
}

#chartSellBtn.sqoff-active {
    background-color: #FFA000; /* Material Amber */
    color: #212529;
}
#chartSellBtn.sqoff-active:hover {
    background-color: #FF8F00;
}

#chartLiveBtn.live-active {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

#chart-main {
    width: 100%;
    height: 100%;
    flex-grow: 1;
}