/* Chinese E-Visa Form Styles */
.evisa-chinese {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "SimSun", sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.evisa-chinese h3 {
    color: #2c5aa0;
    border-bottom: 2px solid #2c5aa0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.evisa-chinese .form-subtitle {
    background-color: #f8f9fa;
    padding: 15px;
    border-left: 4px solid #ffc107;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.6;
    border-radius: 0 5px 5px 0;
}

.evisa-chinese .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.evisa-chinese .form-row.two-column .form-group {
    flex: 1;
    min-width: 280px;
}

.evisa-chinese .form-row.three-column .form-group {
    flex: 1;
    min-width: 200px;
}

.evisa-chinese .form-group {
    margin-bottom: 15px;
    text-align: left;
}

.evisa-chinese .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
    text-align: left;
}

.evisa-chinese .form-group input,
.evisa-chinese .form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
    text-align: left;
}

.evisa-chinese .form-group input:focus,
.evisa-chinese .form-group select:focus {
    outline: none;
    border-color: #2c5aa0;
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.evisa-chinese .form-group input::placeholder {
    color: #999;
    font-style: italic;
}

/* Better spacing for date inputs */
.evisa-chinese .form-group input[type="date"] {
    padding: 11px 12px;
}

.evisa-chinese .form-group.error input,
.evisa-chinese .form-group.error select {
    border-color: #dc3545;
}

.evisa-chinese .error-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.evisa-chinese .photo-upload-container {
    position: relative;
}

.evisa-chinese .photo-upload-container input[type="file"] {
    display: none;
}

.evisa-chinese .photo-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background-color: #fafafa;
}

.evisa-chinese .photo-upload-area:hover {
    border-color: #2c5aa0;
    background-color: #f0f4ff;
}

.evisa-chinese .upload-placeholder {
    color: #666;
}

.evisa-chinese .upload-icon {
    font-size: 48px;
    margin-bottom: 10px;
    color: #2c5aa0;
}

.evisa-chinese .photo-preview {
    text-align: center;
    padding: 10px;
}

.evisa-chinese .photo-preview img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 5px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.evisa-chinese .file-icon {
    font-size: 48px;
    color: #dc3545;
    margin-bottom: 10px;
}

.evisa-chinese .btn-remove-photo {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
}

.evisa-chinese .btn-remove-photo:hover {
    background-color: #c82333;
}

.evisa-chinese .eligibility-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.evisa-chinese .eligibility-notice h4 {
    color: #856404;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.evisa-chinese .eligibility-notice ul {
    margin-left: 20px;
    color: #856404;
    line-height: 1.6;
}

.evisa-chinese .eligibility-notice li {
    margin-bottom: 8px;
}

.evisa-chinese .add-application-section {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.evisa-chinese .btn {
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.evisa-chinese .btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
}

.evisa-chinese .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.2);
}

.evisa-chinese .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.evisa-chinese .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.evisa-chinese .add-application-note {
    margin-top: 10px;
    color: #666;
    font-size: 14px;
}

.evisa-chinese .form-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.evisa-chinese .loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.evisa-chinese .loading-content {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

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

.evisa-chinese .success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    color: #155724;
    margin-top: 20px;
}

.evisa-chinese .success-message h3 {
    color: #155724;
    margin-bottom: 15px;
    border: none;
    padding-bottom: 0;
}

/* Checkbox styling */
.evisa-chinese input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
    transform: scale(1.2);
}

.evisa-chinese .form-group label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    line-height: 1.5;
}

/* Responsive design */
@media (max-width: 768px) {
    .evisa-chinese {
        padding: 15px;
        margin: 10px;
    }
    
    .evisa-chinese .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .evisa-chinese .form-row .form-group {
        min-width: auto;
        width: 100%;
        margin-bottom: 15px;
    }
    
    .evisa-chinese h3 {
        font-size: 1.3rem;
    }
    
    .evisa-chinese .btn-submit {
        width: 100%;
        padding: 15px 20px;
    }
    
    /* Better mobile spacing for form elements */
    .evisa-chinese .form-group input,
    .evisa-chinese .form-group select {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .evisa-chinese .form-group label {
        font-size: 15px;
        margin-bottom: 6px;
    }
}

/* Text center utility */
.evisa-chinese .text-center {
    text-align: center;
}

/* Hide additional applications container initially */
.evisa-chinese .additional-applications-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #dee2e6;
}

/* Dynamic ETA Type Sections */
.evisa-chinese .tourist-fields,
.evisa-chinese .business-fields,
.evisa-chinese .transit-fields {
    display: none;
    margin-top: 20px;
    position: relative;
    text-align: left;
}

.evisa-chinese .business-fields h3,
.evisa-chinese .business-fields .form-group,
.evisa-chinese .business-fields label,
.evisa-chinese .business-fields input,
.evisa-chinese .business-fields select {
    text-align: left;
}

.evisa-chinese .tourist-fields {
    border-left: 4px solid #28a745;
}


.evisa-chinese .transit-fields {
    border-left: 4px solid #ffc107;
}

.evisa-chinese .dynamic-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
    display: flex;
    align-items: center;
    gap: 8px;
}

.evisa-chinese .tourist-fields .dynamic-section-title {
    color: #28a745;
}



/* Smooth transitions for show/hide */
.evisa-chinese .tourist-fields,
.evisa-chinese .business-fields,
.evisa-chinese .transit-fields {
    transition: all 0.3s ease-in-out;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.evisa-chinese .tourist-fields:not([style*="display: none"]),
.evisa-chinese .business-fields:not([style*="display: none"]),
.evisa-chinese .transit-fields:not([style*="display: none"]) {
    opacity: 1;
    max-height: 1000px;
    margin-top: 20px;
}





/* Animation for field appearance */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.evisa-chinese .tourist-fields:not([style*="display: none"]),
.evisa-chinese .business-fields:not([style*="display: none"]),
.evisa-chinese .transit-fields:not([style*="display: none"]) {
    animation: slideInFromTop 0.4s ease-out;
}

/* Responsive adjustments for dynamic sections */
@media (max-width: 768px) {
    .evisa-chinese .tourist-fields::before,
    .evisa-chinese .business-fields::before,
    .evisa-chinese .transit-fields::before {
        display: none;
    }
}
