body {
    font-family: 'Inter', sans-serif;
    line-height: 1.5;
    padding: 1rem;
    background-color: #ffffff;
    font-size: clamp(0.8rem, 2vw, 1rem);
    position: relative;
}

h2,
h3 {
    text-align: center;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

th,
td {
    padding: 0.8rem;
    text-align: center;
    white-space: nowrap;
}

th {
    font-weight: bold;
}

input[type="text"] {
    border: none;
    width: 100%;
    text-align: center;
    outline: none;
    font-size: inherit;
}

/* 修改后的浮动按钮样式 - 开始 */
.floating-buttons {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 10px;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-x: auto;
    justify-content: center;
}

.floating-buttons button {
    background-color: #4299e1;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto;
    flex: 1 1 auto;
    white-space: nowrap;
    margin: 2px;
}

.floating-buttons button:hover {
    background-color: #3182ce;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.floating-buttons button i {
    margin-right: 5px;
}

/* 手机端特定样式 */
@media (max-width: 767px) {
    .floating-buttons {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 8px 5px;
    }

    .floating-buttons button {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 80px;
    }

    .floating-buttons button i {
        margin-right: 4px;
    }
}
/* 修改后的浮动按钮样式 - 结束 */

@media print {
    .floating-buttons {
        display: none;
    }
    body {
        font-size: 0.8rem;
    }
    table {
        width: 100%; /* 确保表格宽度为 100% */
    }
    th,
    td {
        padding: 0.5rem;
        white-space: normal; /* 允许内容换行 */
    }
    /* 增加型号和规格列的宽度 */
    #quoteTable th:nth-child(3),
    #quoteTable td:nth-child(3),
    #quoteTable th:nth-child(4),
    #quoteTable td:nth-child(4) {
        width: 20%; /* 可根据实际情况调整宽度 */
    }
    /* 设置各列宽度 */
    #quoteTable th:nth-child(2),
    #quoteTable td:nth-child(2) {
        width: 8ch;
    }
    #quoteTable th:nth-child(3),
    #quoteTable td:nth-child(3) {
        width: 26ch;
    }
    #quoteTable th:nth-child(4),
    #quoteTable td:nth-child(4) {
        width: 16ch;
    }
    #quoteTable th:nth-child(5),
    #quoteTable td:nth-child(5) {
        width: 4ch;
    }
    #quoteTable th:nth-child(6),
    #quoteTable td:nth-child(6) {
        width: 4ch;
    }
    #quoteTable th:nth-child(7),
    #quoteTable td:nth-child(7) {
        width: 8ch;
    }
    #quoteTable th:nth-child(8),
    #quoteTable td:nth-child(8) {
        width: 15ch;
    }
    /* 新增：隐藏单位列输入框的序列选择箭头 */
    #quoteTable td:nth-child(6) input::-webkit-inner-spin-button,
    #quoteTable td:nth-child(6) input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }
    #quoteTable td:nth-child(6) input {
        -moz-appearance: textfield;
        appearance: textfield;
    }
}

#quoteTable th,
#quoteTable td {
    width: auto;
}
/* 设置各列宽度 */
#quoteTable th:nth-child(1),
#quoteTable td:nth-child(1) {
    width: 6ch;
}
#quoteTable th:nth-child(2),
#quoteTable td:nth-child(2) {
    width: 10ch;
}
#quoteTable th:nth-child(3),
#quoteTable td:nth-child(3) {
    width: 10ch;
}
#quoteTable th:nth-child(4),
#quoteTable td:nth-child(4) {
    width: 16ch;
}
#quoteTable th:nth-child(5),
#quoteTable td:nth-child(5) {
    width: 8ch;
}
#quoteTable th:nth-child(6),
#quoteTable td:nth-child(6) {
    width: 6ch;
}
#quoteTable th:nth-child(7),
#quoteTable td:nth-child(7) {
    width: 8ch;
}
#quoteTable th:nth-child(8),
#quoteTable td:nth-child(8) {
    width: 15ch;
}

.landscape-mode {
    transform: rotate(-90deg);
    transform-origin: left top;
    width: 100vh;
    height: 100vw;
    overflow-x: hidden;
    position: absolute;
    top: 100%;
    left: 0;
}

.model-popup {
    position: absolute;
    display: none;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    /* 添加多列布局 */
    column-count: auto;
    column-width: 150px;
    column-gap: 10px;
}

.model-popup div {
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.model-popup div:hover {
    background-color: #f7fafc;
}

/* 样式 1：经典商务风格 */
.style-1 table {
    border: 2px solid #333;
    border-radius: 8px;
}

.style-1 th {
    background-color: #f7fafc;
    border-bottom: 2px solid #333;
    color: #333;
    font-size: 1.1rem;
}

.style-1 td {
    border-bottom: 1px solid #ccc;
    color: #666;
    font-size: 1rem;
}

/* 样式 2：现代简约风格 */
.style-2 table {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.style-2 th {
    background-color: #f0f0f0;
    border-bottom: 2px solid #e2e8f0;
    color: #333;
    font-size: 1.1rem;
    font-weight: normal;
}

.style-2 td {
    border-bottom: 1px solid #e2e8f0;
    color: #333;
    font-size: 1rem;
}

/* 样式 3：优雅大气风格 */
.style-3 table {
    border: 3px solid #0056b3;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.style-3 th {
    background-color: #e7f3ff;
    border-bottom: 2px solid #0056b3;
    color: #0056b3;
    font-size: 1.2rem;
    font-weight: bold;
    text-transform: uppercase;
}

.style-3 td {
    border-bottom: 1px solid #b3d7ff;
    color: #222;
    font-size: 1.1rem;
}

.style-3 tr:nth-child(even) td {
    background-color: #f2f8ff;
}

.style-3 tr:hover td {
    background-color: #d6eaff;
    transition: background-color 0.3s ease;
}

h2[contenteditable="true"]:focus {
    outline: 2px solid #4299e1;
    border-radius: 4px;
}

/* 自动完成样式 */
.autocomplete {
    position: relative;
    display: inline-block;
    width: 100%;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d4d4d4;
    border-bottom: none;
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
}

.autocomplete-items div {
    padding: 10px;
    cursor: pointer;
    background-color: #fff; 
    border-bottom: 1px solid #d4d4d4; 
}

.autocomplete-items div:hover {
    background-color: #e9e9e9; 
}

.autocomplete-active {
    background-color: DodgerBlue !important; 
    color: #ffffff; 
}