/* 基本样式 */
body {
    padding-top: 0px;
    padding-bottom: 20px;
    background: #e0e4e8;
}

/* 表格样式 */
.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
}

.table th, .table td {
    vertical-align: middle;
}

/* 表单样式 */
.form-label {
    font-weight: bold;
}


/* SKU建议列表 */
#sku-suggestions {
    position: absolute;
    z-index: 1000;
    width: 50%;/* calc(25% - 120px); */
    max-height: 400px;
    overflow-y: auto;
    
}

.list-group-item {
    cursor: pointer;
    background-color: #FFFCD8;
}

.list-group-item:hover {
    background-color: #FFE800;/* f8f9fa */
}


/* 分页样式 */
.pagination {
    margin-top: 20px;
}

h4 {
    margin-top: 0;
}


.yellow {
    background: #FFF05F;
    border: 2px solid #FFF05F;
}

.yellow:hover {
    background: #FFD100;
    border: 2px solid #FFD100;
}

.orange {
    color: #e59d00;/* ffaf00   */
    font-weight: bold;
    /*text-shadow: 1px 1px 0 #000;*/
    text-shadow: 
      -2px -2px 4px #fff,  /* 左上 */
      2px -2px 4px #fff,   /* 右上 */
      -1px 2px 4px #fff,   /* 左下 */
      2px 2px 4px #fff;    /* 右下 */
}

.green {
    color: #3e9800;
    font-weight: bold;
    text-shadow: 
      -2px -2px 4px #fff,  /* 左上 */
      2px -2px 4px #fff,   /* 右上 */
      -1px 2px 4px #fff,   /* 左下 */
      2px 2px 4px #fff;    /* 右下 */
}

.blue {
    color: #0D6EFD;
    font-weight: bold;
    text-shadow: 
      -2px -2px 4px #fff,  /* 左上 */
      2px -2px 4px #fff,   /* 右上 */
      -1px 2px 4px #fff,   /* 左下 */
      2px 2px 4px #fff;    /* 右下 */
}

.btn-msword {
    color: #fff;
    background: #1040aa;
}

.btn-msword:hover {
    color: #fff;
    background: #00246C;
}


.alert {
    position: fixed;
    bottom: 1em;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    min-width: 300px;
    transition: all 0.5s ease;
    opacity: 0.90;
}

/* 添加底部通知样式 */
#notification {
    min-width: 300px;
    max-width: 600px;
}

.alert:hover {
    opacity: 1;
}


.image-thumbnail {
    display: inline-block;
    margin: 5px;
    text-align: center;
}

#image-preview {
    min-height: 200px;
    padding: 10px;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

#image-preview img {
    max-height: 180px;
    width: auto;
}

/* 在static/styles.css中添加 */
#sku-hash-display {
    font-family: 'Courier New';
    font-size: 1rem;
    /*font-weight: bold;*/
    word-break: keep-all;
}

#show-hash {
    font-family: 'Courier New';
    /*font-size: 1rem;*/
    /*font-weight: bold;*/
    word-break: keep-all;
}

.need {
    background: #FFE8EA;
}






/* 关键修复 */
.table-order-list {
  table-layout: fixed; /* 强制遵守定义的宽度 */
  width: 120%; /* 需要明确的总宽度 */
}


/* 表格列宽控制 */
.table-order-list th:nth-child(1) { width: 3%; }  /* 操作列 */
.table-order-list th:nth-child(2) { width: 6%; }  /*  图片列 */
.table-order-list th:nth-child(3) { width: 6%; }   /* ID列 */
.table-order-list th:nth-child(4) { width: 2%; } /* 订单类型 */
.table-order-list th:nth-child(5) { width: 10%; } /* 订单号 */
.table-order-list th:nth-child(6) { width: 7%; } /* 订单备注 */
.table-order-list th:nth-child(7) { width: 8%; } /* 客户名 */
.table-order-list th:nth-child(8) { width: 15%; } /* SKU */
.table-order-list th:nth-child(9) { width: 0%; } /* SKU Hash */
.table-order-list th:nth-child(10) { width: 4%; } /* 尺码 */
.table-order-list th:nth-child(11) { width: 3%; } /* 数量 */
.table-order-list th:nth-child(12) { width: 7%; } /* SKU备注 */
.table-order-list th:nth-child(13) { width: 13%; } /* 运单号 */
.table-order-list th:nth-child(14) { width: 6%; } /* 运单备注 */
.table-order-list th:nth-child(15) { width: 0%; } /* 地址 */
.table-order-list th:nth-child(16) { width: 2%; } /* 录入用户ID */
.table-order-list th:nth-child(17) { width: 8%; } /* 修改时间 */

/* 防止内容换行 */
.table-order-list td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 0; /* 关键属性，强制遵守宽度限制 */
}

/* 特定列允许换行 */
.table-order-list td:nth-child(1), .table-order-list td:nth-child(2), .table-order-list td:nth-child(17), .table-order-list td:nth-child(5), .table-order-list td:nth-child(6), .table-order-list td:nth-child(7), .table-order-list td:nth-child(8), .table-order-list td:nth-child(13)  {
    white-space: normal; /* normal SKU列允许换行 */
}

/* .table-order-list th:nth-child(10) { width: 80px; } */
/* 特定列允许换行（如需要） */
.table-order-list td.wrap-content {
  white-space: normal;
}

/* 图片列特殊处理 */
.table-order-list td:nth-child(2), /* 假设图片是第2列 */
.table-order-list th:nth-child(2) {
  /*width: 3%;  您的目标百分比 */
  min-width: 40px; /* 最小宽度保障 */
  max-width: 200px; /* 最大宽度限制 */
}

/* 图片强制适应 */
.table-order-list td:nth-child(2) img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 2px;
}


/* 数据列 */
.table-order-list tbody tr td:nth-of-type(5) {
  --bs-table-bg: #f8f9fa; /* 使用Bootstrap变量 */
}

.table-order-list tbody tr td:nth-of-type(8) {
  --bs-table-bg: #f8f9fa; /* 使用Bootstrap变量 */
}

  /* 确保表头不受影响 */
.table-order-list thead tr th {
    background-color: #212529 !important; /* Bootstrap深色表头 */
    color: white !important;
}

input[readonly] {
    background-color: #f8f9fa;
}


/* 尺码快捷选择按钮组样式 */
#size-quick-select {
    flex-wrap: wrap;
    gap: 0.2rem;
}

#size-quick-select .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    border-radius: 0.25rem;
    background-color: #fff5cb;
}

#size-quick-select .btn:hover {
    background-color: #0d6efd;
    color: white;
}


