/**
 * 联系表单样式
 * 
 * @package Gaao_Tech
 * @since 1.0.0
 */

/* Contact Form 7 自定义样式 */
.gaao-tech-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.gaao-tech-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* 首页联系表单样式 */
.gaao-tech-contact-form .wpcf7 {
    margin: 0;
}

.gaao-tech-contact-form .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* 表单容器 */
.gaao-tech-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e1e5e9;
}

.gaao-tech-form-wrapper .form-title {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.gaao-tech-form-wrapper .form-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* 询盘表单头部 */
.inquiry-form-header {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px 12px 0 0;
    margin: -2rem -2rem 2rem -2rem;
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f8f9fa;
}

.inquiry-form-header h2 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.inquiry-form-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
}

.inquiry-form-header p {
    opacity: 0.9;
    font-size: 1.125rem;
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row.two-columns {
    grid-template-columns: 1fr 1fr;
}

@media (max-width: 768px) {
    .form-row.two-columns {
        grid-template-columns: 1fr;
    }
}

/* 表单行布局 */
.contact-form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 15px;
}

.contact-form-col {
    flex: 1;
    min-width: 250px;
}

.contact-form-col-full {
    flex: 1 1 100%;
}

/* 标签样式 */
.contact-form-row label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 输入框样式 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: #ffffff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background-color: #fafbfc;
}

.wpcf7 textarea {
    min-height: 80px;
    resize: vertical;
    line-height: 1.6;
}

/* 选择框样式 */
.wpcf7 select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}



/* 提交按钮样式 */
.contact-form-submit {
    text-align: center;
    margin-top: 30px;
}

.wpcf7 input[type="submit"] {
    background: #4285f4;
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: normal;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wpcf7 input[type="submit"]:before {
    content: "\f1d8";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 14px;
}

.wpcf7 input[type="submit"]:hover {
    background: #3367d6;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.wpcf7 input[type="submit"]:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 验证消息样式 */
.wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    font-weight: 500;
}

.wpcf7-validation-errors {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.wpcf7-mail-sent-ok {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.wpcf7-spam-blocked {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

/* 加载状态 */
.wpcf7 .ajax-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    background: url('data:image/svg+xml;charset=utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><path fill="%23667eea" d="M25,5A20.14,20.14,0,0,1,45,22.88a2.51,2.51,0,0,0,2.49,2.26h0A2.52,2.52,0,0,0,50,22.33a25.14,25.14,0,0,0-50,0,2.52,2.52,0,0,0,2.5,2.81h0A2.51,2.51,0,0,0,5,22.88,20.14,20.14,0,0,1,25,5Z"><animateTransform attributeName="transform" type="rotate" from="0 25 25" to="360 25 25" dur="0.6s" repeatCount="indefinite"/></path></svg>') no-repeat center;
    background-size: contain;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .gaao-tech-form-wrapper {
        padding: 20px;
        margin: 0 15px;
    }
    
    .contact-form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .contact-form-col {
        min-width: auto;
    }
    
    .gaao-tech-form-wrapper .form-title {
        font-size: 24px;
    }
    
    .inquiry-form-header h3 {
        font-size: 20px;
    }
    
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 input[type="url"],
    .wpcf7 input[type="number"],
    .wpcf7 select,
    .wpcf7 textarea {
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .wpcf7 input[type="submit"] {
        width: 100%;
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .gaao-tech-form-wrapper {
        padding: 15px;
        margin: 0 10px;
    }
    
    .contact-form-row {
        margin-bottom: 20px;
    }
    
    .gaao-tech-form-wrapper .form-title {
        font-size: 20px;
    }
    
    .inquiry-form-header {
        margin-bottom: 25px;
        padding-bottom: 15px;
    }
    
    .inquiry-form-header h3 {
        font-size: 18px;
    }
    
    .inquiry-form-header p {
        font-size: 14px;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    .gaao-tech-form-wrapper {
        background: #1a1a1a;
        border-color: #333;
        color: #ffffff;
    }
    
    .gaao-tech-form-wrapper .form-title,
    .inquiry-form-header h3 {
        color: #ffffff;
    }
    
    .contact-form-row label {
        color: #e0e0e0;
    }
    
    .inquiry-form-header p {
        color: #b0b0b0;
    }
    
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 input[type="url"],
    .wpcf7 input[type="number"],
    .wpcf7 select,
    .wpcf7 textarea {
        background-color: #2a2a2a;
        border-color: #444;
        color: #ffffff;
    }
    
    .wpcf7 input[type="text"]:focus,
    .wpcf7 input[type="email"]:focus,
    .wpcf7 input[type="tel"]:focus,
    .wpcf7 input[type="url"]:focus,
    .wpcf7 input[type="number"]:focus,
    .wpcf7 select:focus,
    .wpcf7 textarea:focus {
        background-color: #333;
        border-color: #667eea;
    }
    

}

/* 打印样式 */
@media print {
    .gaao-tech-form-wrapper {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .wpcf7 input[type="submit"] {
        display: none;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    .wpcf7 input[type="text"],
    .wpcf7 input[type="email"],
    .wpcf7 input[type="tel"],
    .wpcf7 input[type="url"],
    .wpcf7 input[type="number"],
    .wpcf7 select,
    .wpcf7 textarea {
        border-width: 3px;
    }
    
    .wpcf7 input[type="submit"] {
        border: 3px solid #000;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gaao-tech-form-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* 表单字段聚焦动画 */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="url"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
    position: relative;
}

.wpcf7 input[type="text"]:focus,
.wpcf7 input[type="email"]:focus,
.wpcf7 input[type="tel"]:focus,
.wpcf7 input[type="url"]:focus,
.wpcf7 input[type="number"]:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
    animation: focusGlow 0.3s ease-out;
}

@keyframes focusGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.3);
    }
    100% {
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }
}