/* PMO E-Cab Compatibility Pro v2.1.3 */

/* Google Places suggestions on every device size.
 * Keep the popup inside the viewport and allow complete addresses to wrap. */
body.pmoecab-booking-compatibility .pac-container {
    box-sizing: border-box !important;
    max-width: calc(100vw - 16px) !important;
    overflow-x: hidden !important;
}

body.pmoecab-booking-compatibility .pac-item {
    height: auto !important;
    min-height: 44px;
    padding-top: 7px;
    padding-bottom: 7px;
    line-height: 1.35 !important;
    white-space: normal !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

body.pmoecab-booking-compatibility .pac-item-query {
    display: block;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35 !important;
}

body.pmoecab-booking-compatibility .pac-item-query + span,
body.pmoecab-booking-compatibility .pac-item span:not(.pac-icon),
body.pmoecab-booking-compatibility .pac-matched {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.35 !important;
    overflow-wrap: anywhere;
}

/* Phones and tablets: use a viewport-safe popup width. This applies to
 * portrait and landscape touch devices without changing desktop booking UI. */
@media (max-width: 1180px) and (hover: none) and (pointer: coarse) {
    body.pmoecab-booking-compatibility .pac-container {
        left: 8px !important;
        right: 8px !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        contain: inline-size;
    }

    body.pmoecab-booking-compatibility .pac-item {
        min-height: 48px;
        padding: 8px 12px;
    }
}

@media (max-width: 820px) and (hover: none) and (pointer: coarse) {
    body.pmoecab-booking-compatibility .mptbm_transport_search_area {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: clip;
        box-sizing: border-box;
    }

    body.pmoecab-booking-compatibility #mptbm_map_start_place,
    body.pmoecab-booking-compatibility #mptbm_map_end_place,
    body.pmoecab-booking-compatibility .mptbm_extra_stop_place_input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Vehicle card controls: comfortable text and touch targets. */
    body.pmoecab-booking-compatibility .mptbm_transport_select,
    body.pmoecab-booking-compatibility .mptbm-button-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    body.pmoecab-booking-compatibility .mptbm_transport_select {
        min-height: 46px;
        padding: 10px 16px !important;
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
    }

    body.pmoecab-booking-compatibility .mptbm_transport_select.mptbm-has-extra-info {
        padding-right: 42px !important;
    }

    body.pmoecab-booking-compatibility .mptbm-info-button {
        width: 38px !important;
    }

    body.pmoecab-booking-compatibility .mp_quantity_selector {
        min-height: 42px;
        height: 42px;
        border-radius: 8px;
    }

    body.pmoecab-booking-compatibility .mp_quantity_minus,
    body.pmoecab-booking-compatibility .mp_quantity_plus {
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
    }

    body.pmoecab-booking-compatibility .mp_quantity_input {
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
        font-size: 16px;
        box-sizing: border-box;
    }

    /* Extras: prevent the title, price, select button and quantity from colliding. */
    body.pmoecab-booking-compatibility .mptbm_extra_service_item {
        width: 100%;
        align-items: center;
        gap: 12px;
        padding: 8px 0;
        box-sizing: border-box;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .service_img_area {
        flex: 0 0 92px;
        width: 92px;
        max-width: 92px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .service_img_area img {
        width: 92px !important;
        height: 92px !important;
        max-width: 92px !important;
        max-height: 92px !important;
        object-fit: contain !important;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item > .fdColumn {
        flex: 1 1 auto;
        width: auto !important;
        min-width: 0;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item h4 {
        margin: 0 0 8px;
        font-size: clamp(18px, 5.2vw, 23px);
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item h4 sub {
        display: block;
        margin-top: 4px;
        font-size: 16px;
        line-height: 1.25;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item ._equalChild {
        display: block;
        width: 100%;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .justifyEnd {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
        width: 100%;
        margin-top: 8px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item [data-collapse] {
        margin-right: 0 !important;
        min-width: 126px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item button[data-extra-item] {
        width: auto !important;
        min-width: 112px !important;
        min-height: 44px;
        padding: 9px 16px !important;
        font-size: 16px;
        line-height: 1.2;
        white-space: nowrap;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec {
        width: 126px;
        min-width: 126px;
        height: 44px;
        display: grid;
        grid-template-columns: 42px 42px 42px;
        align-items: stretch;
        overflow: hidden;
        border-radius: 8px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec > * {
        min-width: 0;
        height: 44px;
        box-sizing: border-box;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .decQty,
    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .incQty {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        cursor: pointer;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec label {
        margin: 0;
        width: 42px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec input {
        width: 42px !important;
        min-width: 42px !important;
        height: 44px !important;
        padding: 0 !important;
        text-align: center;
        font-size: 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 390px) and (hover: none) and (pointer: coarse) {
    body.pmoecab-booking-compatibility .mptbm_extra_service_item {
        align-items: flex-start;
        gap: 10px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .service_img_area {
        flex-basis: 78px;
        width: 78px;
        max-width: 78px;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item .service_img_area img {
        width: 78px !important;
        height: 78px !important;
        max-width: 78px !important;
        max-height: 78px !important;
    }

    body.pmoecab-booking-compatibility .mptbm_extra_service_item button[data-extra-item] {
        min-width: 104px !important;
        padding-inline: 13px !important;
    }
}

/* v2.1.3 — reliable extras controls without depending on Font Awesome glyphs. */
body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .decQty,
body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .incQty {
    position: relative;
    color: inherit;
    font-family: Arial, Helvetica, sans-serif !important;
    font-weight: 700;
    line-height: 1;
}

body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .decQty > span,
body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .incQty > span {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 0 !important;
    line-height: 1 !important;
}

body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .decQty > span::before {
    content: "\2212" !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

body.pmoecab-booking-compatibility .mptbm_extra_service_item .qtyIncDec .incQty > span::before {
    content: "+" !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 20px !important;
    font-weight: 700 !important;
}

body.pmoecab-booking-compatibility .mptbm_extra_service_item button[data-extra-item] [data-icon] {
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 0 !important;
}

body.pmoecab-booking-compatibility .mptbm_extra_service_item button[data-extra-item].mActive [data-icon]::before {
    content: "\2713" !important;
    font-family: Arial, Helvetica, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* v2.1.3 — compact, readable checkout fare breakdown. */
.woocommerce-checkout-review-order-table dt.variation-FareBreakdown,
.woocommerce-checkout-review-order-table dd.variation-FareBreakdown,
.woocommerce-cart-form dt.variation-FareBreakdown,
.woocommerce-cart-form dd.variation-FareBreakdown {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table dt.variation-FareBreakdown,
.woocommerce-cart-form dt.variation-FareBreakdown {
    margin-top: 12px !important;
    margin-bottom: 6px !important;
    font-weight: 700 !important;
}

.woocommerce-checkout-review-order-table dd.variation-FareBreakdown > p,
.woocommerce-cart-form dd.variation-FareBreakdown > p {
    margin: 0 !important;
}

.pmoecab-fare-breakdown {
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 0;
    padding: 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 6px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.025);
}

.pmoecab-fare-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 5px 0;
    line-height: 1.35;
}

.pmoecab-fare-row > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pmoecab-fare-row > strong {
    white-space: nowrap;
    text-align: right;
    font-weight: 600;
}

.pmoecab-fare-row .woocommerce-Price-amount {
    white-space: nowrap;
}

.pmoecab-fare-total {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.14);
    font-weight: 700;
}

@media (max-width: 480px) {
    .pmoecab-fare-breakdown {
        max-width: 100%;
        padding: 8px;
    }

    .pmoecab-fare-row {
        gap: 10px;
        font-size: 14px;
    }
}


/* v2.1.3 — prevent the embedded booking form from widening a mobile homepage.
 * This is intentionally scoped to the E-Cab booking body class and touch screens;
 * it does not lock browser zoom or alter unrelated pages. */
@media (max-width: 820px) and (hover: none) and (pointer: coarse) {
    body.pmoecab-booking-compatibility .mptbm_transport_search_area,
    body.pmoecab-booking-compatibility .mptbm_transport_booking_area,
    body.pmoecab-booking-compatibility .mptbm_booking_area,
    body.pmoecab-booking-compatibility .mptbm_booking_panel,
    body.pmoecab-booking-compatibility .mptbm_default_theme,
    body.pmoecab-booking-compatibility .mptbm_dual_booking_wrap,
    body.pmoecab-booking-compatibility .mptbm_dual_booking_form {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: clip !important;
    }

    body.pmoecab-booking-compatibility .mptbm_transport_search_area *,
    body.pmoecab-booking-compatibility .mptbm_transport_booking_area *,
    body.pmoecab-booking-compatibility .mptbm_booking_area *,
    body.pmoecab-booking-compatibility .mptbm_booking_panel * {
        box-sizing: border-box;
        max-width: 100%;
    }

    body.pmoecab-booking-compatibility img,
    body.pmoecab-booking-compatibility iframe,
    body.pmoecab-booking-compatibility canvas {
        max-width: 100% !important;
    }
}

/* v2.1.7 — Fare Details is a dedicated checkout card below Booking Details. */
.woocommerce-checkout-review-order-table dt.variation-FareDetails,
.woocommerce-checkout-review-order-table dd.variation-FareDetails {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout-review-order-table dt.variation-FareDetails {
    margin-top: 8px !important;
    margin-bottom: 6px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

.woocommerce-checkout-review-order-table dd.variation-FareDetails {
    margin: 0 0 10px !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table dd.variation-FareDetails > p {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.woocommerce-checkout-review-order-table .pmoecab-fare-details-box {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 1px solid rgba(15, 23, 42, .16) !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.woocommerce-checkout-review-order-table .pmoecab-fare-details-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: center !important;
    gap: 14px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 6px 0 !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.woocommerce-checkout-review-order-table .pmoecab-fare-details-row + .pmoecab-fare-details-row {
    border-top: 1px solid rgba(15, 23, 42, .10) !important;
}

.woocommerce-checkout-review-order-table .pmoecab-fare-details-row > span {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
}

.woocommerce-checkout-review-order-table .pmoecab-fare-details-row > strong {
    margin: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
}

/* v2.1.8 — Fare Details sits between Booking Details and Extra Services. */
.pmoecab-fare-details-box {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 10px !important;
    border: 1px solid rgba(15, 23, 42, .16) !important;
    border-radius: 6px !important;
    background: #fff !important;
    box-sizing: border-box !important;
}

.pmoecab-fare-details-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) max-content !important;
    align-items: center !important;
    column-gap: 16px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 7px 0 !important;
    line-height: 1.35 !important;
    box-sizing: border-box !important;
}

.pmoecab-fare-details-row + .pmoecab-fare-details-row {
    border-top: 1px solid rgba(15, 23, 42, .10) !important;
}

.pmoecab-fare-details-row > span {
    min-width: 0 !important;
    overflow-wrap: anywhere !important;
}

.pmoecab-fare-details-row > strong {
    margin: 0 !important;
    text-align: right !important;
    white-space: nowrap !important;
    font-weight: 600 !important;
}

/* WooCommerce renders item data as dt/dd. Keep the heading above the card. */
dt.variation-FareDetails,
dt[class*="variation-FareDetails"] {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 8px 0 6px !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
}

dd.variation-FareDetails,
dd[class*="variation-FareDetails"] {
    float: none !important;
    clear: both !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    padding: 0 !important;
}

dd.variation-FareDetails > p,
dd[class*="variation-FareDetails"] > p {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}
