/**
 * 眼睛检查预约表单样式
 * Eye Exam Booking Form Styles
 * 无圆角设计，简洁传统风格
 */

/* 基础容器 */
.yanjing-eye-exam-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft JhengHei', 'PingFang TC', sans-serif;
}

.yanjing-eye-exam-form-wrapper .form-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.yanjing-eye-exam-form-wrapper .form-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* 表单消息 */
.eye-exam-form .form-error,
.eye-exam-form .form-success {
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 0;
    font-size: 14px;
}

.eye-exam-form .form-error {
    background-color: #fef2f2;
    color: #dc2626;
    border: 1px solid #dc2626;
}

.eye-exam-form .form-success {
    background-color: #f0fdf4;
    color: #16a34a;
    border: 1px solid #16a34a;
}

/* 表单部分 */
.form-section {
    margin-bottom: 50px;
 
   
}

.form-section:last-of-type {
    border-bottom: none;
}

/* 分区标题 */
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #d4a574;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4a574;
}

/* 表单字段 */
.form-field {
    margin-bottom: 25px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field input[type="date"],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 0;
    font-size: 14px;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    transition: border-color 0.3s ease;
    height: 44px;
    box-sizing: border-box;
    line-height: 1.5;
}

.form-field textarea {
    height: auto;
    min-height: 100px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #ab8e66;
}

/* 下拉框样式优化 */
.form-field select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}

.form-field input:read-only {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.form-field textarea {
    resize: vertical;
}

/* 必填标记 */
.required {
    color: #dc2626;
    margin-left: 2px;
}

/* 表单行布局 */
.form-row {
    display: grid;
    gap: 15px;
    margin-bottom: 25px;
}

.form-row-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-row-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-row-mobile {
    grid-template-columns: 2fr 1fr 3fr;
    gap: 10px;
}

.form-field-small {
    flex: 0 0 auto;
}

.form-field-tiny {
    flex: 0 0 auto;
   
}

.form-field-grow {
    flex: 1;
}

/* 服务选择 - 方形单选框 */
.service-options {
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.service-radio-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.service-radio-wrapper input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #999;
    border-radius: 0;
    cursor: pointer;
    margin: 0;
    position: relative;
    background-color: #fff;
    transition: all 0.2s ease;
}

.service-radio-wrapper input[type="radio"]:checked {
    border-color: #d4a574;
}

.service-radio-wrapper input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 8px;
    height: 8px;
    background-color: #d4a574;
}

.service-radio-wrapper label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* 服务特色按钮 */
.service-feature-link {
    display: inline-block;
    padding: 12px 20px;
    background-color: #fff;
    border: 1px solid #d1d5db;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.service-feature-link:hover {
    background-color: #f9fafb;
    border-color: #ab8e66;
    color: #ab8e66;
}

/* 服务图片展示 */
.service-image-display {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #f3f4f6;
    margin-top: 20px;
}

.service-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.service-image.active {
    position: relative;
    opacity: 1;
    visibility: visible;
}

.service-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* 单选框 - 方形样式 */
.radio-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.radio-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-wrapper input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 14px;
    height: 14px;
    border: 1px solid #999;
    border-radius: 0;
    cursor: pointer;
    margin: 0;
    position: relative;
    background-color: #fff;
    transition: all 0.2s ease;
}

.radio-wrapper input[type="radio"]:checked {
    border-color: #d4a574;
}

.radio-wrapper input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 8px;
    height: 8px;
    background-color: #d4a574;
}

.radio-wrapper label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    margin: 0;
    user-select: none;
}

/* 复选框 - 传统样式 */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-wrapper label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    line-height: 1.6;
    margin: 0;
}

.checkbox-wrapper a {
    color: #ab8e66;
    text-decoration: underline;
}

.checkbox-wrapper a:hover {
    color: #8a7152;
}

/* 联系方式切换容器 */
.contact-phone-wrapper,
.contact-wechat-wrapper {
    transition: all 0.3s ease;
}

/* 提交按钮 */
.form-actions {
    margin-top: 40px;
    text-align: center;
}

.btn-submit {
    padding: 14px 50px;
    background-color: #ab8e66;
    color: #fff;
    border: none;
    border-radius: 0;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background-color: #8a7152;
}

.btn-submit:disabled {
    background-color: #d1d5db;
    cursor: not-allowed;
}

/* 必填说明 */
.required-note {
    font-size: 12px;
    color: #666;
    margin-top: 20px;
    text-align: right;
}

/* 加载状态 */
.eye-exam-form.is-submitting {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.is-loading {
    position: relative;
    color: transparent;
}

.btn-submit.is-loading::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .yanjing-eye-exam-form-wrapper {
        padding: 30px 15px;
    }
    
    .yanjing-eye-exam-form-wrapper .form-title {
        font-size: 24px;
    }
    
    .section-title {
        font-size: 16px;
    }
    
    .form-row-2,
    .form-row-3 {
        grid-template-columns: 1fr;
    }
    
    .form-row-mobile {
        grid-template-columns: 1fr;
    }
    
    .form-field-tiny {
        display: none;
    }
    
    .service-options {
        flex-direction: column;
        gap: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn-submit {
        width: 100%;
        padding: 14px 20px;
    }
}

/* 打印样式 */
@media print {
    .yanjing-eye-exam-form-wrapper {
        max-width: none;
    }
    
    .btn-submit {
        display: none;
    }
    
    .service-image-display {
        display: none;
    }
}
