/* ═══════════════════════════════════════════════════════════
   RIGHT SIDEBAR  — icon strip + slide-out panels
   (chart-name / toolbar styles live in toolbar.css — not duplicated here)
   ═══════════════════════════════════════════════════════════ */

/* ── Chart shrinks when right sidebar panel is open ── */
#chart-layout-area.rsb-panel-open {
    right: 306px !important;   /* 260px panel + 46px icon strip */
    transition: right 0.22s ease;
}

.rsb-btn-flash { opacity: .4 !important; transition: opacity 0.5s; }

/* ═══════════════════════════════════════════════════════════
   RIGHT SIDEBAR
   ═══════════════════════════════════════════════════════════ */
.rsb-wrap {
    position: fixed;
    right: 0;
    top: 50px;       /* matches topbar height */
    bottom: 0;       /* no bottom bar */
    z-index: 200;
    display: flex;
    flex-direction: row-reverse;
    pointer-events: none;
}

.rsb-icon-strip {
    box-sizing: border-box;
    width: 46px;
    background: var(--ui-panel, #1e222d);
    border-left: 1px solid var(--ui-border, rgba(255,255,255,.08));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 6px 0;
    pointer-events: all;
    flex-shrink: 0;
    overflow: hidden;
}

.rsb-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--ui-muted, #b2b5be);
    cursor: pointer;
    transition: background 120ms, color 120ms;
    flex-shrink: 0;
}
.rsb-icon-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}
.rsb-icon-btn:hover {
    background: var(--ui-hover, rgba(128,128,140,.18));
    color: var(--ui-fg, #ffffff);
}
.rsb-icon-btn.rsb-icon-active {
    background: rgba(41,98,255,.18);
    color: #2962ff;
}

.rsb-panel {
    display: none;
    flex-direction: column;
    box-sizing: border-box;
    width: 260px;
    background: var(--ui-panel, #1e222d);
    border-left: 1px solid var(--ui-border, rgba(255,255,255,.08));
    pointer-events: all;
    overflow: hidden;
    box-shadow: -4px 0 16px rgba(0,0,0,.25);
}
.rsb-panel.rsb-panel-open { display: flex; }

.rsb-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    height: 38px;
    border-bottom: 1px solid var(--ui-border);
    flex-shrink: 0;
}
.rsb-panel-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--ui-fg);
    letter-spacing: .4px;
    text-transform: uppercase;
}
.rsb-panel-close {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--ui-muted);
    cursor: pointer;
}
.rsb-panel-close:hover { background: var(--ui-hover); color: var(--ui-fg); }

.rsb-panel-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}
.rsb-panel-body::-webkit-scrollbar { width: 4px; }
.rsb-panel-body::-webkit-scrollbar-thumb { background: var(--ui-border); border-radius: 2px; }

.rsb-empty {
    padding: 20px 12px;
    font-size: 12px;
    color: var(--ui-muted);
    text-align: center;
}

@media (max-width: 600px) {
    .rsb-wrap { display: none; }
}
