/* ── Chart Drawing Tools ── */

/* Wrapper must inherit flex behavior from chart-container's parent */
#chart-wrapper {
    position: relative;
    flex-shrink: 1;
    min-height: 0;
}

/* Toolbar — z-index 20 to sit above ALL lightweight-charts layers (they use 1-5) */
.cdt-toolbar {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: rgba(10,10,20,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    padding: 4px;
}

.cdt-btn {
    width: 30px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    padding: 0;
    line-height: 1;
    font-family: sans-serif;
}
.cdt-btn:hover {
    background: rgba(255,255,255,0.06);
    color: #bbb;
    border-color: rgba(255,255,255,0.1);
}
.cdt-btn.active {
    background: rgba(41,121,255,0.2);
    color: #2979ff;
    border-color: rgba(41,121,255,0.4);
    box-shadow: 0 0 6px rgba(41,121,255,0.3);
}

.cdt-btn-danger:hover {
    background: rgba(255,23,68,0.12);
    color: #ff1744;
    border-color: rgba(255,23,68,0.2);
}

.cdt-divider {
    height: 1px;
    background: rgba(255,255,255,0.06);
    margin: 2px 4px;
}

/* Mobile */
@media (max-width: 768px) {
    .cdt-toolbar {
        top: 4px;
        left: 4px;
        padding: 3px;
        gap: 1px;
    }
    .cdt-btn {
        width: 28px;
        height: 26px;
        font-size: 12px;
    }
}
