
/* =========================================
   TOUR BOOKING - FIX LAYOUT
========================================= */

.tour_book_04,
.tour_book_04 * {
    box-sizing: border-box;
}

.tour_book_04 {
    width: 100%;
    position: relative;
    clear: both;
    font-size: 14px;
    line-height: 1.5;
}

.tour_book_04::after,
.tour_book_04 .append-icon::after,
.tour_book_04 .tour-booking-row::after {
    content: "";
    display: block;
    clear: both;
}

/* Khu vực chọn ngày và số lượng khách */
.tour_book_04 .append-icon {
    position: relative;
    width: 100%;
    min-height: 42px;
    padding-left: 44px;
    margin-bottom: 18px;
    display: block;
}

/* Icon lịch */
.tour_book_04 .append-icon > .glyphicon:first-child {
    position: absolute;
    top: 3px;
    left: 0;
    float: none;
    color: #99cccc;
    font-size: 30px;
    line-height: 38px;
}

/* Không để form bị đẩy lệch bởi margin */
.tour_book_04 .append-icon > .form-group {
    margin-left: 0 !important;
    margin-bottom: 0;
    width: 100%;
    min-width: 0;
}

/* Khung chọn ngày / khách */
.tour_book_04 .form-group.border {
    position: relative;
    width: 100%;
    min-height: 42px;
    height: auto;
    margin-bottom: 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    overflow: visible;
}

.tour_book_04 .form-group.border input,
.tour_book_04 .form-group.border select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 8px 12px;
    margin: 0;
    border: 0 !important;
    outline: none;
    background: transparent;
    box-shadow: none !important;
    border-radius: 4px;
    font-size: 14px;
}

.tour_book_04 .form-group.border:focus-within {
    border-color: #99cccc;
    box-shadow: 0 0 0 2px rgba(153, 204, 204, .15);
}

/* Icon mũi tên */
.tour_book_04 .append-icon .glyphicon.right {
    position: absolute;
    top: 15px;
    right: 14px;
    z-index: 2;
    float: none;
    font-size: 12px;
    color: #444;
    cursor: pointer;
}

/* Khu vực ngày và giờ */
.tour_book_04 .datepicker-wrapper {
    position: relative;
    width: 49%;
    float: left;
    min-width: 0;
}

.tour_book_04 .date-value {
    width: 49%;
    float: left;
    min-width: 0;
}

.tour_book_04 .separate {
    width: 2%;
    float: left;
    height: 40px;
    border-left: 1px solid #ddd;
}

.tour_book_04 .time-value {
    width: 50%;
    float: right;
    min-width: 0;
}

/* Popup chọn số lượng khách */
.tour_book_04 .dropdown-user {
    position: absolute;
    top: calc(100% + 5px);
    left: 44px;
    right: 0;
    width: auto;
    max-width: 420px;
    padding: 18px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
    z-index: 999;
    display: none;
}

.tour_book_04 .dropdown-user .row {
    margin: 0 0 14px;
    font-size: 14px;
}

.tour_book_04 .dropdown-user .row:last-child {
    margin-bottom: 0;
}

.tour_book_04 .dropdown-user .row p.text-center {
    margin: 0 !important;
    line-height: 38px;
    font-weight: 600;
}

/* Thông tin khách hàng và thanh toán */
.tour_book_04 .form-group {
    min-width: 0;
}

.tour_book_04 .form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.tour_book_04 .option-price .form-group {
    padding: 12px 15px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    transition: background .2s ease, border-color .2s ease;
}

.tour_book_04 .option-price .form-group:hover,
.tour_book_04 .option-price .form-group.selected {
    background: #f0fafa;
    border-color: #99cccc;
}

.tour_book_04 .option-price .form-group label {
    font-size: 14px;
    margin-bottom: 8px;
}

.tour_book_04_checkout {
    font-size: 14px !important;
}

.tour_book_04_checkout .form-group label {
    line-height: 1.5;
}

#right_total_price {
    text-align: right;
    color: #e53935;
    font-size: 20px;
    font-weight: 700;
}

/* =========================================
   TABLET
========================================= */

@media (max-width: 991px) {
    .tour_book_04 .datepicker-wrapper {
        width: 100%;
        float: none;
        margin-bottom: 12px;
    }

    .tour_book_04 .dropdown-user {
        left: 44px;
        max-width: none;
    }
}

/* =========================================
   MOBILE
========================================= */

@media (max-width: 767px) {
    .tour_book_04 {
        font-size: 14px;
    }

    .tour_book_04 .append-icon {
        padding-left: 32px;
        margin-bottom: 14px;
    }

    .tour_book_04 .append-icon > .glyphicon:first-child {
        font-size: 23px;
        line-height: 34px;
    }

    .tour_book_04 .form-group.border {
        min-height: 44px;
    }

    .tour_book_04 .form-group.border input,
    .tour_book_04 .form-group.border select {
        height: 42px;
        font-size: 14px;
    }

    .tour_book_04 .append-icon .glyphicon.right {
        top: 15px;
        right: 12px;
    }

    .tour_book_04 .dropdown-user {
        left: 32px;
        right: 0;
        width: auto;
        max-width: none;
        padding: 12px;
    }

    .tour_book_04 .option-price .form-group {
        padding: 12px;
    }

    #right_total_price {
        text-align: left;
        margin-top: 10px;
        font-size: 18px;
    }
}

/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 575px) {
    .tour_book_04 .date-value,
    .tour_book_04 .time-value {
        width: 100%;
        float: none;
    }

    .tour_book_04 .separate {
        display: none;
    }

    .tour_book_04 .form-group.border {
        margin-bottom: 10px;
    }

    .tour_book_04 .dropdown-user {
        position: fixed;
        top: 50%;
        left: 12px;
        right: 12px;
        bottom: auto;
        width: auto;
        max-width: none;
        max-height: 80vh;
        overflow-y: auto;
        transform: translateY(-50%);
        border-radius: 8px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, .2);
        z-index: 99999;
    }
}

/* ==========================================
   FIX BOOKING SELECTOR / CUSTOMER INFORMATION
========================================== */

.systemFormBooking.tour_book_04_checkout {
    display: block;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}

.systemFormBooking.tour_book_04_checkout .sys-bk-content {
    display: flow-root;
    width: 100%;
    height: auto !important;
    overflow: visible !important;
}

.systemFormBooking.tour_book_04_checkout .sys-bk-content > .row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.systemFormBooking.tour_book_04_checkout .sys-bk-content > .row > .col-md-8,
.systemFormBooking.tour_book_04_checkout .sys-bk-content > .row > .col-md-4 {
    min-width: 0;
}

/* Khu vực bộ chọn ngày và khách */
.tour-booking-selector {
    display: flow-root;
    position: relative;
    width: 100%;
    height: auto !important;
    min-height: 0;
    margin: 20px 0 26px;
    clear: both;
    overflow: visible;
}

/* Các phần tử con không được làm sụp chiều cao */
.tour-booking-selector::after {
    content: "";
    display: table;
    clear: both;
}

.tour-booking-selector .append-icon {
    display: flow-root;
    position: relative;
    float: none;
    width: 100%;
    height: auto !important;
    min-height: 42px;
    margin: 0 0 20px !important;
    clear: both;
}

.tour-booking-selector .append-icon > .form-group {
    position: relative;
    width: auto;
    margin: 0 0 0 44px !important;
    min-height: 42px;
}

/* Tiêu đề thông tin khách hàng */
#billing-detail-title {
    position: relative;
    display: block;
    float: none;
    clear: both;
    width: 100%;
    height: auto;
    margin: 24px 0 12px !important;
    padding: 0;
    line-height: 1.3;
}

/* Không để các trường form chồng lên nhau */
#form-submit-checkout-04 {
    display: flow-root;
    position: relative;
    width: 100%;
    clear: both;
}

#form-submit-checkout-04 .form-group {
    position: relative;
    height: auto;
    margin-bottom: 16px;
}

#form-submit-checkout-04 .form-group.row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

#form-submit-checkout-04 input.form-control {
    width: 100%;
    min-height: 40px;
}

/* Responsive */
@media (max-width: 767px) {
    .systemFormBooking.tour_book_04_checkout .sys-bk-content > .row {
        display: block;
    }

    .tour-booking-selector {
        margin: 14px 0 22px;
    }

    .tour-booking-selector .dropdown-user {
        max-width: calc(100vw - 40px);
    }

    #billing-detail-title {
        margin-top: 20px !important;
        font-size: 24px;
    }

    #form-submit-checkout-04 .form-group.row {
        display: block;
    }

    #form-submit-checkout-04 .form-group.row > [class*="col-"] {
        width: 100%;
        margin-bottom: 14px;
    }
}
