/**
 * CSS cho form hiển thị ngoài trang web
 * MIC Lead Form v1.0.0
 */

/* --- Wrapper chung --- */
.mic-lead-form-wrapper {
    max-width: 800px; /* Giới hạn chiều rộng tối đa của form */
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

/* --- Layout sử dụng Flexbox --- */
.mic-lead-form .mic-form-fields-wrapper {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.mic-lead-form .mic-form-field-wrapper {
    box-sizing: border-box;
    padding: 0 10px;
    margin-bottom: 0px;
    display: flex;
    flex-direction: column;
}

/* --- Cài đặt layout cột --- */
/* 1 cột (mặc định) */
.mic-lead-form.layout-1-col .mic-form-field-wrapper {
    width: 100%;
}

/* 2 cột */
.mic-lead-form.layout-2-col .mic-form-field-wrapper {
    width: 50%;
}

/* 3 cột */
.mic-lead-form.layout-3-col .mic-form-field-wrapper {
    width: 33.3333%;
}

/* --- Định dạng các trường input, label --- */
.mic-form-field-wrapper label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
}

.mic-form-field-wrapper .mic-required-asterisk {
    color: red;
    margin-left: 2px;
}

.mic-form-field-wrapper input[type="text"],
.mic-form-field-wrapper input[type="email"],
.mic-form-field-wrapper input[type="tel"],
.mic-form-field-wrapper input[type="number"],
.mic-form-field-wrapper select,
.mic-form-field-wrapper textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.mic-form-field-wrapper textarea {
    min-height: 120px;
    resize: vertical;
}

/* --- Thông báo lỗi/thành công --- */
.mic-form-response {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 15px;
}

.mic-form-response.success {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.mic-form-response.error {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.mic-form-response.error ul {
    margin: 0;
    padding-left: 20px;
}

/* --- Nút Submit --- */
.mic-form-submit-button {
    padding: 4px 12px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background-color: #b71c1c; /* Màu xanh WordPress */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.mic-form-submit-button:hover {
    background-color: #d32f2f;
}

.mic-form-submit-button:disabled {
    background-color: #a0a5aa;
    cursor: not-allowed;
}

/* --- Responsive cho thiết bị di động --- */
@media (max-width: 768px) {
    .mic-lead-form.layout-2-col .mic-form-field-wrapper,
    .mic-lead-form.layout-3-col .mic-form-field-wrapper {
        width: 100%; /* Chuyển về 1 cột trên mobile */
    }
}

.mic-form-field-wrapper span.select2.select2-container.select2-container--default {margin-bottom: 15px;}