/*
 * Mantis 5803 - phone layout for the add-ons step of the yacht booking pop-up.
 * Pairs with /js/xy5803-extras.js, which adds the .xy5803 class, the category list and the
 * "< Category" bar (round 3, 02-Dec-2026), a photo cell, a formatted price and an
 * Add / - n + control per row, the footer total, a list Back button and the promo link.
 * View state: #online_reservation_step_3.xy5803-in = one category open (its panel carries
 * .xy5803-cur); without it the step shows the category list.
 * Everything visible is inside the max-width:767px block; at 768px and up the added
 * pieces are hidden and the step looks exactly as before.
 * WHY no inner scroll: the old 300px max-height on each group's .panel-body put a
 * scrolling box inside the scrolling pop-up; on a phone the page scroll got caught in it
 * and the last rows were cut off.
 * Colours: #c7081b is the site's brand red (Checkout button); #262626 body text.
 */
#online_reservation_step_3 .xy5803-pic,
#online_reservation_step_3 .xy5803-qty,
#online_reservation_step_3 .xy5803-menu,
#online_reservation_step_3 .xy5803-bar,
#online_reservation_step_3 .xy5803-back,
#online_reservation_step_3 .xy5803-price,
#online_reservation_step_3 .xy5803-total,
#online_reservation_step_3 .xy5803-promo-link { display: none; }

@media screen and (max-width: 767px) {
    /* Trip summary: hidden in the pop-up while the extras step shows (class set by the JS);
       the pop-up title already reads "16-Dec-2026, 4 hours, 110ft Luxury Yacht". The 4188
       inline form on /yacht-rental/ has no such title, so there it stays, compact. */
    #online_reservation_modal:not(.xy4188-inline) #online_reservation_details.xy5803-s3 { display: none; }
    #online_reservation_details.xy5803-s3 img { display: none; }
    #online_reservation_details.xy5803-s3 [class*="col-"] { padding-top: 0; }
    #online_reservation_details.xy5803-s3 table { margin: 4px 0 6px; border: 0; background: #f7f7f7; border-radius: 10px; }
    #online_reservation_details.xy5803-s3 table th,
    #online_reservation_details.xy5803-s3 table td {
        border: 0 !important; padding: 3px 12px !important; font-size: 13px; line-height: 1.35; font-weight: 400;
    }
    #online_reservation_details.xy5803-s3 table tr:first-child > * { padding-top: 9px !important; }
    #online_reservation_details.xy5803-s3 table tr:last-child > * { padding-bottom: 9px !important; font-weight: 700; }
    #online_reservation_details.xy5803-s3 table th { color: #8a8a8a; width: 34%; }
    #online_reservation_details.xy5803-s3 table tr:not(:last-child) td { color: #262626; }

    /* Intro: main.js's two-line italic sentence becomes a heading + one short line
       (font-size 0 hides the original words; both lines come from the pseudo-elements). */
    #online_reservation_step_3.xy5803 .modal-body > .text-italic {
        font-style: normal; font-size: 0; line-height: 0; margin: 6px 0 4px;
    }
    #online_reservation_step_3.xy5803 .modal-body > .text-italic:before {
        content: "Add extras to your trip"; display: block; font-size: 20px; line-height: 1.3; font-weight: 700;
        color: #262626; margin: 4px 0 2px;
    }
    #online_reservation_step_3.xy5803 .modal-body > .text-italic:after {
        content: "Optional. You can also add them after booking."; display: block; font-size: 13px; line-height: 1.4; color: #8a8a8a;
    }
    /* Inside a category the bar is the heading; the intro and the promo wait on the list. */
    #online_reservation_step_3.xy5803.xy5803-in .modal-body > .text-italic,
    #online_reservation_step_3.xy5803.xy5803-in .reservation-totals { display: none; }

    /* Category list: one tidy row per category. */
    #online_reservation_step_3.xy5803:not(.xy5803-in) .xy5803-menu { display: block; margin: 10px 0 6px; border-top: 1px solid #efefef; }
    #online_reservation_step_3.xy5803 .xy5803-cat {
        display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 10px 0; margin: 0;
        border: 0; border-bottom: 1px solid #efefef; border-radius: 0; box-shadow: none !important;
        background: none; text-align: left; color: #262626; -webkit-tap-highlight-color: transparent;
    }
    #online_reservation_step_3.xy5803 .xy5803-cat.xy5803-empty { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-cat-pic {
        flex: 0 0 52px; width: 52px; height: 52px; border-radius: 12px; overflow: hidden; background: #f3f3f3;
    }
    #online_reservation_step_3.xy5803 .xy5803-cat-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
    #online_reservation_step_3.xy5803 .xy5803-cat-pic.xy5803-nopic img { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-cat-t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
    #online_reservation_step_3.xy5803 .xy5803-cat-l { font-size: 16px; font-weight: 600; line-height: 1.3; }
    #online_reservation_step_3.xy5803 .xy5803-cat-n { font-size: 13px; color: #8a8a8a; margin-top: 2px; }
    #online_reservation_step_3.xy5803 .xy5803-cat-go {
        flex: 0 0 auto; width: 9px; height: 9px; margin-right: 4px;
        border-top: 2px solid #b5b5b5; border-right: 2px solid #b5b5b5; transform: rotate(45deg);
    }
    #online_reservation_step_3.xy5803 .xy5803-badge {
        display: none; flex: 0 0 auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #c7081b;
        color: #fff; font-size: 12px; line-height: 22px; font-weight: 700; text-align: center;
    }
    #online_reservation_step_3.xy5803 .xy5803-cat.xy5803-has .xy5803-badge { display: inline-block; }

    /* Category bar: "< Decorations   All extras", sticks under the pop-up header. */
    #online_reservation_step_3.xy5803.xy5803-in .xy5803-bar {
        display: flex; align-items: center; gap: 12px; width: 100%; margin: 0; padding: 14px 0;
        position: -webkit-sticky; position: sticky; top: var(--xy5803-top, 44px); z-index: 3;
        border: 0; border-bottom: 1px solid #efefef; border-radius: 0; box-shadow: none !important;
        background: #fff; text-align: left; color: #262626; -webkit-tap-highlight-color: transparent;
    }
    /* 4188 inline form (search results page): it scrolls with the page, under the site's own
       header, so a sticky bar would park itself over that header. */
    #online_reservation_modal.xy4188-inline #online_reservation_step_3.xy5803 .xy5803-bar { position: relative; top: auto; }
    #online_reservation_step_3.xy5803 .xy5803-bar-a {
        flex: 0 0 auto; width: 11px; height: 11px; margin-left: 4px;
        border-bottom: 2px solid #262626; border-left: 2px solid #262626; transform: rotate(45deg);
    }
    #online_reservation_step_3.xy5803 .xy5803-bar-t { flex: 1 1 auto; font-size: 18px; font-weight: 700; line-height: 1.2; }
    #online_reservation_step_3.xy5803 .xy5803-bar-s { flex: 0 0 auto; font-size: 13px; color: #8a8a8a; }

    /* Groups: no boxes, no headings; only the chosen group shows. */
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion { margin-bottom: 8px; }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion > .panel {
        display: none; border: 0; box-shadow: none; background: none; margin: 0;
    }
    #online_reservation_step_3.xy5803.xy5803-in #online_booking_extras_accordion > .panel.xy5803-cur { display: block; }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion > .panel > .panel-heading { display: none; }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion > .panel.xy5803-cur > .panel-collapse {
        display: block !important; height: auto !important; visibility: visible;
    }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion .panel-body {
        max-height: none !important; overflow: visible !important; padding: 0; border: 0 !important;
    }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion .panel-body > div { margin-bottom: 0 !important; }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion table,
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion tbody { display: block; width: 100%; }
    #online_reservation_step_3.xy5803 #online_booking_extras_accordion thead { display: none; }

    /* One item: photo | name + price | Add or - n + */
    #online_reservation_step_3.xy5803 tr.xy5803-row {
        display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: 12px;
        align-items: center; padding: 12px 0; border-bottom: 1px solid #f2f2f2;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row:last-child { border-bottom: 0; }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td {
        display: block; border: 0 !important; padding: 0 !important; font-size: 13px;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td.xy5803-pic {
        grid-column: 1; grid-row: 1 / span 2; align-self: center;
        width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: #f3f3f3;
    }
    #online_reservation_step_3.xy5803 td.xy5803-pic img {
        display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: end; }
    /* Price cell: main.js's bare number is hidden (font-size 0), the JS's "AED 10,000" shows. */
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(3) {
        grid-column: 2; grid-row: 2; align-self: start; color: #6a6a6a; font-size: 0 !important; line-height: 0; margin-top: 4px;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row .xy5803-price { display: inline; font-size: 14px; line-height: 1.3; }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; position: relative; }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td.xy5803-opts { grid-column: 1 / -1; grid-row: 3; }
    #online_reservation_step_3.xy5803 td.xy5803-opts > [class*="col-"] { float: none; width: auto; padding: 0; }
    #online_reservation_step_3.xy5803 td.xy5803-opts .xyao-cell { padding-top: 10px; }

    /* !important: on /yacht-rental/ the 4188 inline form sits in .container, where
       xy5709.css forces .row margins to -15px !important and the name slid under the photo. */
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(2) .row { margin: 0 !important; }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(2) .row > [class*="col-"] {
        float: none; width: auto; padding: 0; display: block;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row .image-modal {
        color: #262626; text-decoration: none; font-size: 15px; font-weight: 600; line-height: 1.3;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row > td:nth-child(2) > .row > div:first-child {
        font-size: 15px; font-weight: 600; line-height: 1.3; color: #262626;
    }
    #online_reservation_step_3.xy5803 tr.xy5803-row .image-modal .fa-external-link { display: none; }

    #online_reservation_step_3.xy5803 tr.xy5803-row select[class$="-addon-selector"] {
        position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; overflow: hidden;
    }

    /* Add (nothing picked) or - n + (picked). */
    #online_reservation_step_3.xy5803 .xy5803-qty {
        display: flex; align-items: center; height: 36px; border-radius: 999px; background: #fff5f6;
    }
    #online_reservation_step_3.xy5803 .xy5803-qty button {
        height: 36px; padding: 0; border: 0; background: none; color: #c7081b; line-height: 1;
        -webkit-tap-highlight-color: transparent;
    }
    #online_reservation_step_3.xy5803 .xy5803-minus,
    #online_reservation_step_3.xy5803 .xy5803-plus { width: 36px; font-size: 22px; font-weight: 600; }
    #online_reservation_step_3.xy5803 .xy5803-qty button:disabled { color: #e3a3aa; }
    #online_reservation_step_3.xy5803 .xy5803-val { min-width: 18px; text-align: center; font-size: 15px; font-weight: 700; color: #c7081b; }
    #online_reservation_step_3.xy5803 .xy5803-add { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-qty.xy5803-zero { background: none; }
    #online_reservation_step_3.xy5803 .xy5803-qty.xy5803-zero > * { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-qty.xy5803-zero > .xy5803-add {
        display: block; min-width: 72px; padding: 0 18px; border: 1px solid #c7081b; border-radius: 999px;
        font-size: 14px; font-weight: 700;
    }

    /* Promo code behind a link; totals line moves to the footer. */
    #online_reservation_step_3.xy5803 .reservation-totals { margin-top: 4px; }
    #online_reservation_step_3.xy5803 .xy5803-promo > .control-label,
    #online_reservation_step_3.xy5803 .xy5803-promo > .input-group { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-promo.xy5803-promo-open > .control-label,
    #online_reservation_step_3.xy5803 .xy5803-promo.xy5803-promo-open > .input-group { display: block; }
    #online_reservation_step_3.xy5803 .xy5803-promo.xy5803-promo-open > .input-group { display: table; }
    #online_reservation_step_3.xy5803 .xy5803-promo.xy5803-promo-open > .xy5803-promo-link { display: none; }
    #online_reservation_step_3.xy5803 .xy5803-promo-link {
        display: inline-block; padding: 6px 0; border: 0; background: none; color: #262626;
        font-size: 14px; text-decoration: underline;
    }
    #online_reservation_step_3.xy5803 .reservation-totals .text-primary { display: none; }

    /* Close duplicates the X in the header; the footer becomes total over Back + Checkout.
       The footer is a no-wrap flex row (5709 inline CSS); wrap it so the total and any
       booking error notice (main.js prepends .reservation-error-message) get a full line. */
    #online_reservation_step_3.xy5803 > .modal-footer [data-dismiss="modal-close-reservation"] { display: none; }
    /* In a category, Back returns to the category list (the JS's button), not to step 2. */
    #online_reservation_step_3.xy5803.xy5803-in > .modal-footer #online_reservation_step_3_back_button { display: none; }
    #online_reservation_step_3.xy5803.xy5803-in > .modal-footer .xy5803-back { display: inline-block; }
    #online_reservation_step_3.xy5803 > .modal-footer { flex-wrap: wrap; }
    #online_reservation_step_3.xy5803 > .modal-footer > .reservation-error-message { flex: 0 0 100%; order: 0; }
    #online_reservation_step_3.xy5803 .xy5803-total {
        display: flex; flex: 0 0 100%; order: 0; align-items: baseline; gap: 8px; margin: 0 0 2px; text-align: left;
    }
    #online_reservation_step_3.xy5803 .xy5803-total-l { font-size: 14px; color: #6a6a6a; }
    #online_reservation_step_3.xy5803 .xy5803-extras { font-size: 12px; color: #8a8a8a; }
    #online_reservation_step_3.xy5803 .xy5803-grand { margin-left: auto; font-size: 17px; font-weight: 700; color: #262626; }
}
