/* Hua Cheng Lead Form Styles */

.hc-form-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Source Info */
.hc-source-info {
    text-align: right;
    margin-bottom: 10px;
    color: #666;
    font-size: 12px;
}

/* Loading状态 */
.hc-loading {
    text-align: center;
    padding: 60px 20px;
}

.hc-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976D2;
    border-radius: 50%;
    animation: hc-spin 1s linear infinite;
}

@keyframes hc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 表单样式 */
.hc-form {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hc-form-group {
    margin-bottom: 2px;
}

.hc-form-group label {
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.hc-form-group input[type="text"],
.hc-form-group input[type="email"],
.hc-form-group input[type="tel"],
.hc-form-group select,
.hc-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.hc-form-group input:focus,
.hc-form-group select:focus,
.hc-form-group textarea:focus {
    outline: none;
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* 电话号码输入 */
.hc-phone-input {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.3s;
}

.hc-phone-input:focus-within {
    border-color: #1976D2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

.hc-phone-prefix {
    padding: 12px 0 12px 16px;
    background: #f5f5f5;
    color: #666;
    font-size: 16px;
    white-space: nowrap;
}

.hc-phone-input input {
    border: none !important;
    box-shadow: none !important;
    flex: 1;
}

/* 多选下拉框 */
.hc-multiselect-wrapper {
    position: relative;
}

.hc-multiselect-display {
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background: white;
    min-height: 44px;
    display: flex;
    align-items: center;
    color: #666;
    transition: border-color 0.3s;
    position: relative;
}

.hc-multiselect-display::after {
    content: '▼';
    position: absolute;
    right: 16px;
    font-size: 12px;
    color: #666;
}

.hc-multiselect-display:hover {
    border-color: #1976D2;
}

.hc-multiselect-display.has-selection {
    color: #333;
}

.hc-multiselect-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.hc-multiselect-option {
    padding: 12px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.hc-multiselect-option:hover {
    background-color: #f5f5f5;
}

.hc-multiselect-option input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 错误提示 */
.hc-error {
    display: block;
    color: #D32F2F;
    font-size: 13px;
    margin-top: 2px;
    min-height: 2px;
}

/* 按钮 */
.hc-form-buttons {
    display: flex;
    gap: 2px;
    margin-top: 2px;
}

.hc-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.hc-btn-clear {
    background: white;
    color: #1976D2;
    border: 2px solid #1976D2;
}

.hc-btn-clear:hover {
    background: #f5f5f5;
}

.hc-btn-submit {
    background: linear-gradient(to right, #1976D2, #D32F2F);
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.hc-btn-submit:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.hc-btn-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.hc-btn-submit.loading {
    position: relative;
    color: transparent;
}

.hc-btn-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: hc-spin 0.8s linear infinite;
}

/* Modal */
.hc-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.hc-modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}

.hc-modal-icon {
    display: inline-block;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 20px;
    font-size: 30px;
    line-height: 60px;
}

.hc-modal-icon.success {
    background: #E8F5E9;
    color: #4CAF50;
}

.hc-modal-icon.success::before {
    content: '✓';
}

.hc-modal-icon.error {
    background: #FFEBEE;
    color: #D32F2F;
}

.hc-modal-icon.error::before {
    content: '✕';
}

.hc-modal-content h3 {
    margin: 0 0 12px;
    font-size: 22px;
    color: #333;
}

.hc-modal-content p {
    margin: 0 0 24px;
    color: #666;
    line-height: 1.5;
}

.hc-modal-content .hc-btn {
    width: 100%;
}

.hc-form-container select option {
    display: none;
}

.hc-form-container select:focus option,
.hc-form-container select option:checked {
    display: block;
}


/* 响应式 */
@media (max-width: 600px) {
    .hc-form-container {
        padding: 10px;
    }
    
    .hc-form {
        padding: 20px;
    }
    
    .hc-form-buttons {
        flex-direction: column;
    }
    
    .hc-btn {
        width: 100%;
    }
}
