/* application.html专用样式 */

/* 在线申请检测页面样式 */
.application {
    padding: 20px 0;
    background-color: #fff;
}

.application-content {
    max-width: 1200px;
    margin: 0 auto;
    background-color: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.upload-section {
    flex: 0 0 300px;
    margin-bottom: 0;
}

.detection-section {
    flex: 1;
    min-width: 0;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.upload-section h3,
.detection-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.upload-container {
    text-align: center;
}

.upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 60px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fff;
}

.upload-area:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.upload-icon {
    font-size: 3rem;
    color: #007bff;
    margin-bottom: 20px;
}

.upload-area p {
    color: #666;
    font-size: 16px;
}

/* 图片预览样式 */
.upload-preview {
    margin-top: 20px;
    text-align: center;
}

.upload-preview img {
    max-width: 300px;
    margin: 0 auto 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 检测项目样式 */
.detection-section {
    /* margin-top: 20px; */
    /* padding-top: 20px; */
    /* border-top: 1px solid #eee; */
}

.detection-items {
    margin-bottom: 30px;
    width: 100%;
    overflow-x: auto; /* 允许横向滚动 */
}

/* 表格样式 */
.detection-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    font-size: 14px;
}

.detection-table th,
.detection-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

.detection-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.detection-table tr {
    transition: background-color 0.2s ease;
}

.detection-table tr:hover {
    background-color: #f8f9fa;
}

.detection-table tr:last-child td {
    border-bottom: none;
}

.detection-table td:nth-child(8) { /* 备注列 */
    max-width: 200px;
    word-break: break-word;
}

/* 复选框列 */
.detection-table .detection-checkbox {
    text-align: center;
}

.detection-price {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.1rem;
    margin-top: 5px;
}

.sample-name {
    font-size: 1.2rem;
    font-weight: bold;
}

/* 现代化下拉框样式 */
.sample-select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    appearance: none;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 180px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.sample-select:hover {
    border-color: #007bff;
    box-shadow: 0 2px 6px rgba(0,123,255,0.1);
}

.sample-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.sample-select option {
    padding: 10px;
    font-size: 14px;
    background-color: #fff;
    color: #333;
}

/* 心跳动画 */
@keyframes heartbeat {
    0% {
        transform: scale(1);
    }
    14% {
        transform: scale(1.1);
    }
    28% {
        transform: scale(1);
    }
    42% {
        transform: scale(1.1);
    }
    70% {
        transform: scale(1);
    }
}

/* 样品名称选项组样式 */
.sample-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
}

.sample-option {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.sample-option input[type="radio"] {
    display: none;
}

.option-text {
    padding: 8px 16px;
    border: 2px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
}

.sample-option:hover .option-text {
    border-color: #007bff;
    background-color: #f0f8ff;
    color: #007bff;
}

.sample-option input[type="radio"]:checked + .option-text {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
    font-weight: bold;
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 自定义输入框样式 */
.custom-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.custom-input {
    padding: 6px 12px;
    border: 2px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    width: 180px;
}

.custom-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* 为选中的自定义选项添加样式 */
.custom-option input[type="radio"]:checked + .option-text {
    border-color: #007bff;
    background-color: #007bff;
    color: #fff;
    animation: none;
}

.total-amount {
    font-size: 1.2rem;
    font-weight: bold;
}

.total-label {
    color: #333;
}

.total-value {
    color: #e74c3c;
    font-size: 1.5rem;
}

.detection-checkbox {
    text-align: center;
    width: 50px;
}

.detection-checkbox input {
    /* width: 20px;
    height: 20px; */
    cursor: pointer;
}
.section-title-application {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1px;
    color: #333;
    font-weight: 700;
    display: none;
}
.section-title-sub {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 5px;
    color: #333;
    font-weight: 700;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .application {
        padding: 50px 0;
    }
    
    .application-content {
        flex-direction: column;
        padding: 20px;
        gap: 20px;
    }
    
    .upload-section,
    .detection-section {
        width: 100%;
    }
    
    .upload-area {
        padding: 40px 15px;
    }
    
    .upload-icon {
        font-size: 2.5rem;
    }
    
    /* 表格响应式样式 */
    .detection-table {
        font-size: 12px;
    }
    
    .detection-table th,
    .detection-table td {
        padding: 8px 6px;
    }
    
    /* 调整表格列宽以适应移动设备 */
    .detection-table th:nth-child(3), /* 测试项目 */
    .detection-table th:nth-child(4), /* 检验方法 */
    .detection-table th:nth-child(5), /* 优惠价 */
    .detection-table th:nth-child(6), /* 测试部位 */
    .detection-table th:nth-child(7), /* 样品量 */
    .detection-table th:nth-child(8), /* 限值指标 */
    .detection-table th:nth-child(9) { /* 备注 */
        min-width: 100px;
    }
    
    /* 在极小屏幕上，确保表格可以滚动但内容不溢出 */
    .detection-items {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* 针对中等屏幕的优化 */
@media (min-width: 769px) and (max-width: 1200px) {
    .application-content {
        max-width: 100%;
        padding: 20px;
    }
    
    .upload-section {
        flex: 0 0 250px;
    }
    
    .detection-table {
        font-size: 13px;
    }
    
    .detection-table th,
    .detection-table td {
        padding: 10px 8px;
    }
}