/* lpw_drag_table.css
 * 横向拖动 + 紧凑行高样式（funnystore 列表通用）
 * 创建：2026-10-10
 * 引用页面：list_product_base_warehouse.php、list_product_normal3.php
 *
 * 用法：
 *   1) 主表格外包一层 <div class="lpw-table-scroll">，
 *   2) 表格加 class "lpw-data-table"，
 *   3) 引入 lpw_drag_table.js（自动给 .lpw-table-scroll 绑定拖动手势）
 */

/* 让 .lpw-table-scroll 不被 .app-wrapper { overflow-x:hidden } 截断 */
html { overflow-x: auto !important; overflow-y: scroll !important; }
body { overflow-x: visible !important; overflow-y: visible !important; }
.app-wrapper { overflow-x: visible !important; }
.main-column { overflow-x: visible !important; }

.lpw-table-scroll {
    width: 100%;
    display: block;
    position: relative;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: white;
    /* 2026-10-11：默认 cursor 取消 grab，文本可选；只在按下 Ctrl 时由 JS 临时改为 grab */
    cursor: default;
}
.lpw-table-scroll.is-dragging { cursor: grabbing; }

/* 拖动时 input/select/button 临时不响应鼠标，避免误输入 */
.lpw-table-scroll.is-dragging input,
.lpw-table-scroll.is-dragging select,
.lpw-table-scroll.is-dragging button { pointer-events: none !important; }

/* 紧凑行高 —— 让列表更紧凑、易扫读 */
.lpw-data-table th,
.lpw-data-table td {
    padding: 6px 10px !important;
    line-height: 1.35 !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    /* 2026-10-10：列宽不足换行问题修复 —— 默认 nowrap，让列按内容自然撑开（不再换行难看） */
    white-space: nowrap !important;
}
/* 表头：列宽不足换行问题 —— 单行显示 */
.lpw-data-table th {
    padding: 8px 10px !important;
    background: #f8fafc;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #cbd5e1;
    white-space: nowrap !important;
}
.lpw-data-table td input[type="text"],
.lpw-data-table td input[type="number"],
.lpw-data-table td input[type="date"] {
    padding: 3px 8px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    height: auto !important;
}

/* 名称列最大宽度限制，超长换行（避免行被撑成全宽） */
.lpw-data-table td.lpw-name-cell { max-width: 320px; }
.lpw-data-table td.lpw-name-cell a { word-break: break-word; }

/* 实际仓库副本芯片 —— list_product_normal3.php 用 */
.lpw-wh-copies { display: block; margin-top: 4px; line-height: 1.6; white-space: normal; }
.lpw-wh-chip {
    display: inline-block;
    padding: 2px 8px;
    margin: 1px 2px;
    border-radius: 10px;
    color: #1e293b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid rgba(0,0,0,.08);
    white-space: nowrap;
}
.lpw-wh-chip:hover { filter: brightness(0.92); text-decoration: none; }
