/* 强制隐藏被 TomSelect 接管的原生 select 元素 */
  select.ts-hidden-accessible,
  .ts-wrapper + select,
  .multi-select-custom[style*="display: none"] {
    display: none !important;
    opacity: 0 !important;
    position: absolute !important;
    pointer-events: none !important;
  }

  /* 确保外层包裹框定位正确，防止下拉菜单乱飘 */
  .ts-wrapper {
    position: relative !important;
  }

  /* 纯时间 picker：彻底隐藏日历部分 */
.only-time-picker .calendars {
    display: none !important;
}

.only-time-picker main {
    padding: 0 !important;
    min-height: unset !important;
}

.only-time-picker .time-plugin-container {
    border-top: none !important; /* 去掉顶部分割线 */
}

/*富文本编辑框*/
/* 默认亮色模式 */
.tiptap {
    background-color: #fff;
    color: #333;
    border: 1px solid #ccc;
    padding: 1rem;
}

/* 自动适配浏览器暗色模式 */
@media (prefers-color-scheme: dark) {
    .tiptap {
        background-color: transparent;
        color: #f5f5f5;
        border-color: #444;
        min-height: 300px;    /* 最小高度，避免空内容时太矮 */
        max-height: 600px;    /* 最大高度，超过这个高度将出现滚动条 */
        height: 300px;        /* 或者你可以固定高度 */
        overflow-y: auto;     /* 垂直方向超出时自动显示滚动条 */
    }

    /* 针对选中的文本颜色调整 */
    .tiptap ::selection {
        background-color: #444;
    }
}

.ProseMirror {
    @apply prose prose-slate dark:prose-invert max-w-none p-4 min-h-[300px] border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800;
}

/* Tiptap resizable node view 的手柄样式（官方不提供，必须自己写） */
[data-resizable-node-view] {
    @apply relative inline-block;
}

[data-resize-handle] {
    @apply absolute bg-blue-600 border-2 border-white rounded-full shadow-lg cursor-nwse-resize z-10;
    width: 14px;
    height: 14px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

[data-resize-handle]:hover {
    @apply opacity-100 scale-125;
}

/* 具体方向 cursor 和位置（官方 resizable node view 会加 data-resize-handle="top-left" 等） */
[data-resize-handle="top-left"],
[data-resize-handle="bottom-right"] {
    @apply cursor-nwse-resize;
}

[data-resize-handle="top-right"],
[data-resize-handle="bottom-left"] {
    @apply cursor-nesw-resize;
}

[data-resize-handle="left"],
[data-resize-handle="right"] {
    @apply cursor-ew-resize w-2 h-full rounded-none;
}

[data-resize-handle="top"],
[data-resize-handle="bottom"] {
    @apply cursor-ns-resize h-2 w-full rounded-none;
}

/* 拖拽中图片半透明提示 */
[data-resizing] img {
    @apply opacity-75;
}

.tiptap [data-type="column"] {
    outline: 1px dashed #e2e8f0; /* 辅助线 */
    min-height: 50px;
}

/* 当选中某一栏时高亮 */
.tiptap [data-type="column"]:focus-within {
    outline: 2px solid #3b82f6;
}
/*富文本编辑框 end*/

