/* Tech Style Form Styles */

/* Form Container */
.tech-contact-form-container {
    background: transparent;
    border: none;
    padding: 0;
    backdrop-filter: none;
    box-shadow: none;
    position: relative;
    overflow: visible;
}

.tech-contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Form Layout */
.contact-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-form-label {
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.contact-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

/* Form Inputs - 清淡蓝色风格 */
.tech-contact-input, .tech-contact-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    outline: none;
    position: relative;
    backdrop-filter: blur(10px);
}

.tech-contact-input:focus, .tech-contact-textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.tech-contact-input::placeholder, .tech-contact-textarea::placeholder {
    color: var(--text-secondary);
}

.tech-contact-textarea {
    resize: none;
    min-height: 120px;
    width: 100%;
}

/* Form Helpers */
.contact-char-counter {
    position: absolute;
    bottom: 0.25rem;
    right: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    pointer-events: none;
}

.contact-required-mark {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

/* Form Actions */
.contact-form-actions {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* 验证码区域 - 紧凑精干设计 */
.contact-captcha-section {
    margin: 1.5rem 0 1rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 212, 255, 0.1);
}

.contact-captcha-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

.contact-captcha-input {
    flex: 1;
    max-width: 180px;
}

.contact-captcha-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-captcha-img {
    height: 32px;
    width: auto;
    min-width: 100px;
    max-width: 120px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f9f9f9;
}

.contact-captcha-img:hover {
    opacity: 0.8;
    border-color: #bbb;
}

/* Submit Button */
.contact-submit-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

.tech-contact-submit-btn {
    position: relative;
    background: var(--gradient-primary);
    border: none;
    border-radius: 8px;
    padding: 1.25rem 3rem;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

.tech-contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.tech-contact-submit-btn:active {
    transform: translateY(0);
}

.contact-btn-text {
    position: relative;
    z-index: 2;
}

.contact-btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.tech-contact-submit-btn:hover .contact-btn-glow {
    left: 100%;
}

/* Loading State */
.tech-contact-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.tech-contact-submit-btn:disabled:hover {
    transform: none;
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-captcha-section {
        margin: 1rem 0;
        padding: 0.75rem 0;
    }

    .contact-captcha-row {
        grid-template-columns: 1fr auto;
        gap: 0.5rem;
    }

    .contact-captcha-input {
        max-width: 140px;
    }

    .contact-captcha-image {
        justify-content: flex-start;
    }

    .contact-captcha-img {
        height: 30px;
        min-width: 90px;
        max-width: 110px;
    }
    
    .tech-contact-submit-btn {
        min-width: 180px;
        padding: 1rem 2rem;
    }
}

/* Form Validation States */
.tech-contact-input:invalid {
    border-color: #ef4444;
}

.tech-contact-input:valid {
    border-color: rgba(0, 212, 255, 0.4);
}

/* Focus Within Enhancement */
.contact-form-group:focus-within .contact-form-label {
    color: var(--primary-color);
}

/* Smooth Transitions */
.contact-form-group {
    transition: all 0.3s ease;
}

.contact-form-group:hover {
    transform: translateY(-1px);
}

/* Form Animation */
@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tech-contact-form {
    animation: formFadeIn 0.6s ease-out;
}

.contact-form-group {
    animation: formFadeIn 0.6s ease-out;
    animation-fill-mode: both;
}

.contact-form-group:nth-child(1) { animation-delay: 0.1s; }
.contact-form-group:nth-child(2) { animation-delay: 0.2s; }
.contact-form-group:nth-child(3) { animation-delay: 0.3s; }
.contact-form-group:nth-child(4) { animation-delay: 0.4s; }
.contact-form-group:nth-child(5) { animation-delay: 0.5s; }

/* Accessibility Improvements */
.tech-contact-input:focus,
.tech-contact-textarea:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .tech-contact-form,
    .contact-form-group {
        animation: none;
    }
    
    .tech-contact-input,
    .tech-contact-textarea,
    .tech-contact-submit-btn {
        transition: none;
    }
}
