/* Onepim side panel block (2026-11-22, คุณเคน T-312) - goes with onepim-side-panel.js. ONE copy in Onepim-AI-Chat-Kit\web,
   byte-identical in every host (tools/check_same.py). KenDecor Living Blueprint: --kd-* tokens with brand fallbacks.
   Tunables: --osp-grip-w (drag edge), --osp-accent (grip/hover colour). The width itself is --osp-w (set by the JS). */
.osp{--osp-grip-w:6px;position:relative;box-sizing:border-box;width:var(--osp-w,300px);min-width:0;flex:0 0 auto}

/* fold button: inside the host's bar (option bar) or a small button in the panel's inner top corner */
.osp-fold{flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;margin:0;border:0;border-radius:var(--kd-radius,4px);
  background:transparent;color:var(--kd-text-muted,rgba(61,74,77,.72));font:inherit;font-size:16px;line-height:1;cursor:pointer}
.osp-fold:not(.osp-fold--in-bar){position:absolute;top:4px;z-index:4;background:var(--kd-bg,#fff)}
.osp--right > .osp-fold:not(.osp-fold--in-bar){left:8px}
.osp--left > .osp-fold:not(.osp-fold--in-bar){right:8px}
.osp-fold--in-bar{align-self:center}
.osp-fold:hover{background:var(--kd-primary-tint,#E3F1F2);color:var(--kd-primary-darkest,#054E55)}

/* drag edge on the inner side (right panel = left edge, left panel = right edge) */
.osp-grip{position:absolute;top:0;height:100%;width:var(--osp-grip-w);cursor:col-resize;z-index:5;touch-action:none;outline:0}
.osp--right > .osp-grip{left:0}
.osp--left > .osp-grip{right:0}
.osp-grip::after{content:"";position:absolute;top:0;bottom:0;left:calc(50% - 1px);width:2px;background:transparent;transition:background .12s}
.osp-grip:hover::after,.osp-grip:focus-visible::after,body.osp-dragging .osp-grip::after{background:var(--osp-accent,var(--kd-primary,#0B8A96))}
body.osp-dragging,body.osp-dragging *{cursor:col-resize!important;user-select:none!important}
body.osp-dragging iframe,body.osp-dragging canvas,body.osp-dragging embed,body.osp-dragging object{pointer-events:none}

/* folded: only the strip shows (vertical label); click it to unfold */
.osp-strip{display:none}
.osp.is-collapsed{padding:0!important;overflow:hidden!important}
.osp.is-collapsed > :not(.osp-strip){display:none!important}
.osp.is-collapsed > .osp-strip{display:flex;flex-direction:column;align-items:center;gap:10px;box-sizing:border-box;width:100%;height:100%;min-height:0;
  margin:0;padding:10px 0;border:0;background:var(--kd-bg,#fff);color:var(--kd-primary-darkest,#054E55);cursor:pointer;
  font:inherit;font-family:var(--kd-font,"Anuphan","Noto Sans Thai",system-ui,sans-serif);font-size:12.5px;font-weight:700}
.osp-strip:hover{background:var(--kd-primary-tint,#E3F1F2)}
.osp-strip__ic{font-size:15px;line-height:1}
.osp-strip__lbl{writing-mode:vertical-rl;white-space:nowrap}
.osp-fold:focus-visible,.osp-strip:focus-visible{outline:2px solid var(--kd-primary,#0B8A96);outline-offset:-2px}

/* phone: the panel is shown as the host lays it out, no fold/drag */
.osp.osp-phone{width:auto}
.osp.osp-phone > .osp-grip,.osp.osp-phone > .osp-fold,.osp.osp-phone .osp-fold--in-bar,.osp.osp-phone > .osp-strip{display:none!important}

/* No visible scrollbar (คุณเคน 2026-11-21): scroll by mouse wheel / touch */
.osp,.osp *{scrollbar-width:none!important}
.osp::-webkit-scrollbar,.osp *::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}
@media (prefers-reduced-motion:reduce){.osp-grip::after{transition:none}}
