/* ==========================================================================
   前端设置中心弹窗：拖拽调整大小
   --------------------------------------------------------------------------
   设置中心是预构建 Svelte 包里的 .sc-modal-wrap > .sc-modal（750×640 居中）。
   不去改那个包，由 index.html 里的脚本在弹窗出现时补三个拖拽手柄，
   样式集中放这里，方便单独调。
   ========================================================================== */

.sc-modal { position: relative; }

/* 设置中心的标题栏可以拖动移动弹窗（脚本里绑定） */
.sc-modal .sc-main-header { cursor: move; user-select: none; }
.sc-modal.bntab-moving, .sc-modal.bntab-moving * { user-select: none !important; }

.sc-modal .bntab-resize {
    position: absolute;
    z-index: 5;
    touch-action: none;
}

/* 右边缘 */
.sc-modal .bntab-resize-e {
    top: 0;
    right: -4px;
    width: 10px;
    height: 100%;
    cursor: ew-resize;
}

/* 下边缘（避开右下角） */
.sc-modal .bntab-resize-s {
    left: 0;
    bottom: -4px;
    width: calc(100% - 20px);
    height: 10px;
    cursor: ns-resize;
}

/* 右下角 */
.sc-modal .bntab-resize-se {
    right: -4px;
    bottom: -4px;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
}

/* 右下角斜纹：提示这里可以拖 */
.sc-modal .bntab-resize-grip {
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 12px;
    height: 12px;
    pointer-events: none;
    opacity: .35;
    color: currentColor;
    background-image: repeating-linear-gradient(-45deg, currentColor 0 1px, transparent 0 4px);
}

/* 拖动时别选中文字 */
.sc-modal.bntab-resizing,
.sc-modal.bntab-resizing * { user-select: none !important; }

/* 手机上手指要用来滚动，不启用拖拽 */
@media (max-width: 900px) {
    .sc-modal .bntab-resize,
    .sc-modal .bntab-resize-grip { display: none; }
}
