/**
 * Contact Form 7 Styles cho About Landing Page
 * 
 * File CSS này style Contact Form 7 để match với design hiện tại
 * 
 * Lưu ý: Icon path sẽ được set động bằng inline CSS trong enqueue-assets.php
 */

/* Wrapper cho Contact Form 7 trong .hnlen-contact-form */
.hnlen-contact-form .wpcf7 {
    margin: 0;
    padding: 0;
}

.hnlen-contact-form .wpcf7-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Form Row - để group các field cùng hàng */
.hnlen-contact-form .wpcf7-form .wpcf7-form-control-wrap {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Tạo form row bằng cách wrap các field trong span với class hnlen-form-row */
.hnlen-contact-form .hnlen-form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

.hnlen-contact-form .hnlen-form-row .wpcf7-form-control-wrap {
    flex: 1 1 0;
}

/* Labels - Style cho label trong Contact Form 7 */
.hnlen-contact-form .wpcf7 label {
    color: #131313;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 21px;
    margin-bottom: 0;
    display: block;
}

/* Label riêng biệt trong hnlen-form-group (giống mẫu HTML) */
.hnlen-contact-form .hnlen-form-group > label,
.hnlen-contact-form .wpcf7-form .hnlen-form-group > label {
    color: #131313;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    line-height: 21px;
    margin-bottom: 4px;
    display: block;
}

/* Đảm bảo label hiển thị trước input trong form-group */
.hnlen-contact-form .hnlen-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 0;
}

.hnlen-contact-form .hnlen-form-group .wpcf7-form-control-wrap {
    width: 100%;
    margin-top: 0;
}

/* Ẩn label mặc định của Contact Form 7 nếu có (vì đã dùng label riêng) */
.hnlen-contact-form .wpcf7-form-control-wrap > label {
    display: none;
}

/* Inputs - Text, Email, Tel */
.hnlen-contact-form .wpcf7 input[type="text"],
.hnlen-contact-form .wpcf7 input[type="email"],
.hnlen-contact-form .wpcf7 input[type="tel"],
.hnlen-contact-form .wpcf7 input[type="url"],
.hnlen-contact-form .wpcf7 input[type="number"],
.hnlen-contact-form .wpcf7 textarea {
    height: 52px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    color: #131313;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}

.hnlen-contact-form .wpcf7 textarea {
    height: auto;
    min-height: 52px;
    resize: vertical;
}

/* Placeholder */
.hnlen-contact-form .wpcf7 input::placeholder,
.hnlen-contact-form .wpcf7 textarea::placeholder {
    color: #D9D9D9;
}

/* Focus state */
.hnlen-contact-form .wpcf7 input:focus,
.hnlen-contact-form .wpcf7 textarea:focus {
    outline: none;
    border-color: #3E622E;
    box-shadow: 0 0 0 3px rgba(62, 98, 46, 0.1);
    transform: translateY(-2px);
}

/* Submit Button */
.hnlen-contact-form .wpcf7 input[type="submit"],
.hnlen-contact-form .wpcf7 .wpcf7-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 50px;
    font-family: 'Baloo 2', sans-serif;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    background: #3E622E;
    color: white;
    width: 218px;
    height: auto;
    margin-top: 0;
}

.hnlen-contact-form .wpcf7 input[type="submit"]:hover,
.hnlen-contact-form .wpcf7 .wpcf7-submit:hover {
    background: #2d4a22;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(62, 98, 46, 0.3);
}

/* Button icon - thêm icon vào button submit */
/* Lưu ý: Icon sẽ được thêm bằng JavaScript như một span element */
/* JavaScript sẽ tự động wrap submit button trong .wpcf7-submit-wrapper */
.hnlen-contact-form .wpcf7-submit-wrapper {
    position: relative;
    display: inline-block;
    width: auto;
}

.hnlen-contact-form .wpcf7-submit-wrapper input[type="submit"],
.hnlen-contact-form .wpcf7-submit-wrapper .wpcf7-submit {
    position: relative;
    padding-right: 32px !important;
    width: 218px !important;
}

.hnlen-contact-form .wpcf7-submit-wrapper .wpcf7-submit-icon {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-block;
    width: 12px;
    height: 12px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    z-index: 1;
}

/* Validation messages */
.hnlen-contact-form .wpcf7-not-valid-tip {
    color: #dc3232;
    font-size: 12px;
    font-family: 'Inter', sans-serif;
    margin-top: 4px;
    display: block;
}

.hnlen-contact-form .wpcf7-validation-errors,
.hnlen-contact-form .wpcf7-mail-sent-ok,
.hnlen-contact-form .wpcf7-mail-sent-ng,
.hnlen-contact-form .wpcf7-spam {
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    margin: 10px 0 0;
}

.hnlen-contact-form .wpcf7-mail-sent-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hnlen-contact-form .wpcf7-validation-errors,
.hnlen-contact-form .wpcf7-mail-sent-ng,
.hnlen-contact-form .wpcf7-spam {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Checkbox và Radio */
.hnlen-contact-form .wpcf7-checkbox,
.hnlen-contact-form .wpcf7-radio {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hnlen-contact-form .wpcf7-list-item {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hnlen-contact-form .wpcf7-list-item input[type="checkbox"],
.hnlen-contact-form .wpcf7-list-item input[type="radio"] {
    width: auto;
    height: auto;
    margin: 0;
    cursor: pointer;
}

.hnlen-contact-form .wpcf7-list-item label {
    font-weight: 400;
    cursor: pointer;
    margin: 0;
}

/* File upload */
.hnlen-contact-form .wpcf7-file {
    padding: 14px 16px;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    background: white;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

/* Select dropdown */
.hnlen-contact-form .wpcf7-select {
    height: 52px;
    padding: 14px 16px;
    background: white;
    border: 1px solid #D9D9D9;
    border-radius: 8px;
    color: #131313;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    box-sizing: border-box;
    cursor: pointer;
}

.hnlen-contact-form .wpcf7-select:focus {
    outline: none;
    border-color: #3E622E;
    box-shadow: 0 0 0 3px rgba(62, 98, 46, 0.1);
    transform: translateY(-2px);
}

/* Loading spinner */
.hnlen-contact-form .wpcf7 .ajax-loader {
    display: inline-block;
    margin-left: 8px;
    vertical-align: middle;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .hnlen-contact-form .hnlen-form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .hnlen-contact-form .hnlen-form-row .wpcf7-form-control-wrap {
        width: 100%;
    }
    
    .hnlen-contact-form .wpcf7 input[type="text"],
    .hnlen-contact-form .wpcf7 input[type="email"],
    .hnlen-contact-form .wpcf7 input[type="tel"],
    .hnlen-contact-form .wpcf7 textarea {
        width: 100%;
        box-sizing: border-box;
    }
    
    .hnlen-contact-form .wpcf7 input[type="submit"],
    .hnlen-contact-form .wpcf7 .wpcf7-submit {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hnlen-contact-form .wpcf7 label {
        font-size: 14px;
    }
    
    .hnlen-contact-form .wpcf7 input[type="text"],
    .hnlen-contact-form .wpcf7 input[type="email"],
    .hnlen-contact-form .wpcf7 input[type="tel"],
    .hnlen-contact-form .wpcf7 textarea {
        font-size: 14px;
        padding: 10px 12px;
    }
}
