/**
 * 铆接兔 快速下单样式（简化版）
 * 参考工品一号：少线框、白底、浅灰分隔、字体≥14px
 */

.rivrab-qo {
    margin: 0 0 40px;
    font-size: 14px;
    color: #333;
}

/* 提示条 */
.rivrab-qo-notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 2px;
}

.rivrab-qo-notice-success {
    background: #f0f9ff;
    border: 1px solid #a3ceff;
    color: #0066cc;
}

.rivrab-qo-notice-error {
    background: #fff5f5;
    border: 1px solid #ffc9c9;
    color: #e5484d;
}

.rivrab-qo-notice a {
    color: #0066cc;
    text-decoration: underline;
}

/* 标题与说明 */
.rivrab-qo-head {
    margin-bottom: 12px;
}

.rivrab-qo-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
}

.rivrab-qo-desc {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
}

/* 表格容器 */
.rivrab-qo-table-wrap,
.rivrab-qo-result-wrap {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 2px;
    overflow-x: auto;
}

.rivrab-qo-table,
.rivrab-qo-result-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 900px;
}

.rivrab-qo-table th,
.rivrab-qo-result-table th {
    padding: 12px 10px;
    background: #f7f8fa;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    text-align: center;
    border-bottom: 1px solid #e8e8e8;
    white-space: nowrap;
}

.rivrab-qo-table td,
.rivrab-qo-result-table td {
    padding: 10px;
    font-size: 14px;
    color: #333;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #f0f0f0;
    word-break: break-all;
}

.rivrab-qo-table tbody tr:last-child td,
.rivrab-qo-result-table tbody tr:last-child td {
    border-bottom: none;
}

/* 列宽 */
.rivrab-qo-th-idx { width: 44px; text-align: center; }
.rivrab-qo-th-product { width: 200px; }
.rivrab-qo-th-price { width: 120px; }
.rivrab-qo-th-qty { width: 100px; }
.rivrab-qo-th-op { width: 50px; text-align: center; }

/* 品名搜索 */
.rivrab-qo-product-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    background: #fff;
}

.rivrab-qo-product-input:focus {
    outline: none;
    border-color: #0066cc;
}

.rivrab-qo-product-dropdown {
    position: absolute;
    z-index: 100;
    width: 280px;
    max-height: 260px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #e8e8e8;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 2px;
}

.rivrab-qo-td-product {
    position: relative;
}

.rivrab-qo-option {
    padding: 10px 12px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}

.rivrab-qo-option:last-child {
    border-bottom: none;
}

.rivrab-qo-option:hover {
    background: #f0f9ff;
}

.rivrab-qo-no-result {
    padding: 12px;
    color: #999;
    font-size: 14px;
}

/* 属性列 */
.rivrab-qo-attr-select {
    width: 100%;
    padding: 8px 6px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.4;
    background: #fff;
    box-sizing: border-box;
}

.rivrab-qo-attr-select:focus {
    outline: none;
    border-color: #0066cc;
}

.rivrab-qo-attr-select:disabled {
    background: #f7f8fa;
    color: #999;
    border-color: #e8e8e8;
}

.rivrab-qo-fixed-label {
    display: inline-block;
    padding: 8px 0;
    color: #999;
    font-size: 14px;
}

/* 价格列 */
.rivrab-qo-price-text {
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.rivrab-qo-price-text .woocommerce-Price-amount {
    color: #333;
}

.rivrab-qo-no-sku {
    color: #e5484d;
    font-size: 14px;
}

/* 无库存行内红字 */
.rivrab-qo-row-msg {
    display: block;
    margin-top: 4px;
    color: #e5484d;
    font-size: 13px;
    line-height: 1.4;
    white-space: nowrap;
}

/* 数量 */
.rivrab-qo-qty,
.rivrab-qo-item-qty {
    width: 100%;
    padding: 8px 6px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    line-height: 1.4;
    box-sizing: border-box;
    text-align: center;
}

.rivrab-qo-qty:focus,
.rivrab-qo-item-qty:focus {
    outline: none;
    border-color: #0066cc;
}

.rivrab-qo-qty:disabled {
    background: #f7f8fa;
    color: #999;
    border-color: #e8e8e8;
}

/* 行删除按钮 */
.rivrab-qo-row-del,
.rivrab-qo-item-del {
    width: 28px;
    height: 28px;
    padding: 0;
    background: transparent;
    border: none;
    color: #999;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: none;
}

.rivrab-qo-row-del:hover,
.rivrab-qo-item-del:hover {
    color: #e5484d;
    background: transparent;
}

/* 操作按钮 */
.rivrab-qo-actions {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    align-items: center;
}

.rivrab-qo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 24px;
    background: #fff;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    border-radius: 2px;
    transition: none;
}

.rivrab-qo-btn:hover {
    border-color: #0066cc;
    color: #0066cc;
}

.rivrab-qo-btn-primary {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.rivrab-qo-btn-primary:hover {
    background: #0052a3;
    border-color: #0052a3;
    color: #fff;
}

.rivrab-qo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ------------------------------------------------------------------
 * 结果表
 * ------------------------------------------------------------------ */
.rivrab-qo-result {
    margin-top: 32px;
}

.rivrab-qo-result-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.rivrab-qo-result-title {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.rivrab-qo-result-summary {
    color: #999;
    font-size: 14px;
}

/* 结果表列宽 */
.rivrab-qo-th-check { width: 44px; text-align: center; }
.rivrab-qo-th-info { width: 260px; }
.rivrab-qo-th-spec { width: auto; }
.rivrab-qo-th-rprice { width: 120px; text-align: center; }
.rivrab-qo-th-rqty { width: 100px; text-align: center; }
.rivrab-qo-th-rsub { width: 120px; text-align: center; }
.rivrab-qo-th-rop { width: 50px; text-align: center; }

.rivrab-qo-item-check,
.rivrab-qo-check-all {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* 商品信息 */
.rivrab-qo-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rivrab-qo-item-img {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    object-fit: contain;
    border: 1px solid #f0f0f0;
    background: #fff;
    border-radius: 2px;
}

.rivrab-qo-item-name {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.rivrab-qo-item-sku {
    margin-top: 2px;
    color: #999;
    font-size: 13px;
}

.rivrab-qo-item-price,
.rivrab-qo-item-subtotal {
    white-space: nowrap;
    text-align: right;
    font-size: 14px;
    color: #333;
}

/* 结果表操作区 */
.rivrab-qo-result-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.rivrab-qo-result-total {
    margin-left: auto;
    color: #333;
    font-size: 15px;
    font-weight: 600;
}

/* 响应式 */
@media (max-width: 991px) {
    .rivrab-qo-table,
    .rivrab-qo-result-table {
        table-layout: auto;
        min-width: 900px;
    }

    .rivrab-qo-table-wrap,
    .rivrab-qo-result-wrap {
        overflow-x: auto;
    }
}
