/* 动态表单组件样式 */

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 500;
}

.form-group label .required {
    color: #ff6b6b;
    margin-left: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: #fff;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.95);
}

.form-group select option {
    color: #333;
    background-color: #fff;
}

/* 提交按钮 */
.form-submit-btn {
    width: 30%;
    min-width: 120px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 20px;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    cursor: pointer;
    padding: 15px 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
}

.radio-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.radio-item input[type="radio"] {
    cursor: pointer;
    margin: 0 8px 0 0 !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.radio-item label {
    color: #e0e0e0;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
}

/* 复选框组 */
.checkbox-group-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 5px;
    transition: all 0.3s;
    background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-item:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.2);
}

.checkbox-item input[type="checkbox"] {
    cursor: pointer;
}

.checkbox-item span {
    color: #e0e0e0;
    font-size: 14px;
}

/* 全宽表单组 */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* 验证码 */
.captcha-field {
    margin-bottom: 20px;
}

.captcha-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.captcha-input {
    flex: 1;
    max-width: 200px;
    background-color: rgba(255, 255, 255, 0.95);
    color: #333;
}

.captcha-img {
    height: 40px;
    cursor: pointer;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: opacity 0.3s;
}

.captcha-img:hover {
    opacity: 0.8;
}

/* 验证码弹窗 */
.captcha-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.captcha-modal.show {
    display: flex;
}

.captcha-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    text-align: center;
}

.captcha-modal-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.captcha-modal-content .captcha-image {
    width: 100%;
    height: 50px;
    margin-bottom: 15px;
    cursor: pointer;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.captcha-modal-content input[type="text"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 18px;
    letter-spacing: 5px;
    color: #333;
    background-color: white;
}

.captcha-modal-content input[type="text"]:focus {
    outline: none;
    border-color: #667eea;
}

.captcha-modal-content .btn-group {
    display: flex;
    gap: 10px;
}

.captcha-modal-content button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.captcha-modal-content .btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.captcha-modal-content .btn-confirm:hover {
    transform: translateY(-2px);
}

.captcha-modal-content .btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.captcha-modal-content .btn-cancel:hover {
    background: #e0e0e0;
}

/* 响应式 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .radio-group,
    .checkbox-group-form {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .radio-item,
    .checkbox-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        padding: 12px 15px !important;
        width: calc(50% - 5px) !important;
        box-sizing: border-box !important;
    }

    .radio-item input[type="radio"],
    .checkbox-item input[type="checkbox"] {
        margin: 0 8px 0 0 !important;
        width: 16px !important;
        height: 16px !important;
        flex-shrink: 0 !important;
    }

    .radio-item label,
    .checkbox-item label {
        white-space: nowrap !important;
    }

    .radio-item span,
    .checkbox-item span {
        display: inline-block !important;
    }

    .form-submit-btn {
        width: 100%;
    }

    .captcha-input {
        max-width: 150px;
    }
}

/* 移动端超强修复 - 放在媒体查询外面确保生效 */
@media (max-width: 768px) {
    body .footer-cta-section .radio-group {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    
    body .footer-cta-section .radio-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: calc(50% - 5px) !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 15px 10px !important;
        box-sizing: border-box !important;
        flex: 0 0 calc(50% - 5px) !important;
    }
    
    body .footer-cta-section .radio-item input[type="radio"] {
        display: inline-block !important;
        width: 16px !important;
        height: 16px !important;
        min-width: 16px !important;
        max-width: 16px !important;
        margin: 0 8px 0 0 !important;
        padding: 0 !important;
        flex-shrink: 0 !important;
        order: 0 !important;
    }
    
    body .footer-cta-section .radio-item label {
        display: inline-block !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        flex: 1 !important;
        text-align: center !important;
    }
}
