/* CSS định hình bố cục Form Bát Tự */
.battu-form-dark {
    max-width: 100%;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 15px;
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
}

.form-section-title {
    font-weight: bold;
    margin: 15px 0 10px 0;
    color: #b08d57;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Áp dụng Flexbox để chia cột */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px; /* Khoảng cách giữa các cột */
}

/* Chia 2 cột (Giới tính & Hôn nhân / Giờ & Phút) */
.form-col-2 .form-group {
    flex: 1 1 calc(50% - 15px);
    margin-bottom: 0;
}

/* Chia 3 cột (Năm - Tháng - Ngày) */
.form-col-3 .form-group {
    flex: 1 1 calc(33.333% - 15px);
    margin-bottom: 0;
}

/* Style cho input và select để chúng đồng đều */
.form-group input, 
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Đảm bảo padding không phá vỡ chiều rộng */
    font-size: 15px;
    height: 42px;
}

.select-wrapper {
    width: 100%;
}

/* Nút Submit */
.btn-submit.dark-submit {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    background-color: #dc3545;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit.dark-submit:hover {
    background-color: #c82333;
}

/* Responsive: Thu về 1 cột trên điện thoại nhỏ để tránh chữ bị ép lại */
@media (max-width: 576px) {
    .form-col-2 .form-group,
    .form-col-3 .form-group {
        flex: 1 1 100%;
        margin-bottom: 10px;
    }
}


/* CSS khắc phục lỗi nhảy dòng form xem ngày - Ngày tốt trong tháng*/
.custom-search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end; /* Căn đáy để button ngang hàng với select */
    gap: 15px;
    margin-bottom: 20px;
}

.custom-search-form .form-col {
    display: flex;
    flex-direction: column;
    gap: 6px; /* Khoảng cách giữa nhãn (label) và ô chọn (select) */
}

.custom-search-form label {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    margin: 0;
}

.custom-search-form .select-group {
    display: flex;
    gap: 10px;
}

.custom-search-form select.form-select {
    height: 40px; /* Cố định chiều cao */
    padding: 0 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #334155;
    outline: none;
    font-family: inherit;
    font-size: 14px;
}

.custom-search-form .form-btn {
    display: flex;
}

.custom-search-form .form-btn button.btn-red {
    height: 40px; /* Đồng bộ chiều cao với select */
    padding: 0 24px;
    background-color: #dc2626;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.custom-search-form .form-btn button.btn-red:hover {
    background-color: #b91c1c;
}

/* Responsive: Tự động rớt dòng xếp dọc cho giao diện điện thoại */
@media (max-width: 600px) {
    .custom-search-form {
        flex-direction: column;
        align-items: flex-start;
    }
    .custom-search-form .form-col,
    .custom-search-form .select-group,
    .custom-search-form select.form-select,
    .custom-search-form .form-btn,
    .custom-search-form .form-btn button.btn-red {
        width: 100%;
    }
}