/* Responsive rules for the embedded (iframe) cart, checkout and order-error pages.
   Desktop (>= 992px) is intentionally untouched: every rule below is either a harmless
   max-width guard or lives inside a max-width media query. Selectors are prefixed with
   #Content / #billingform so they win over the Webflow stylesheet that loads later. */

/* ------------------------------------------------------------------ */
/* Small desktops / large tablets (the Webflow cart is 1200px wide and */
/* used to be clipped on both sides between 992px and 1199px)          */
/* ------------------------------------------------------------------ */
@media only screen and (max-width: 1199px) {
    #EvergladesInner { width: 100% !important; max-width: 100%; }
    #Content { width: 100% !important; max-width: 100%; padding: 0 !important; margin: 0 auto !important; }
    #Content .container.cart { max-width: 100%; }
    #billingform .container-checkout50 { min-width: 0 !important; width: 100%; }
    #billingform .div-block { min-width: 0 !important; width: 100% !important; }
    #billingform .container-billing-info { width: 100% !important; }
    #billingform .contianer-ccinfo { min-width: 0 !important; }
    #billingform .cc-card { max-width: 100%; min-width: 0 !important; }
    #billingform .cc-card .cc-magstrip { min-width: 0 !important; }
    #billingform .order-items { min-width: 0 !important; }
    #billingform .block-content-3 { min-width: 0 !important; }
}

/* ------------------------------------------------------------------ */
/* Tablet and below                                                    */
/* ------------------------------------------------------------------ */
@media only screen and (max-width: 991px) {
    #EvergladesInner { width: 100% !important; }
    #Content { width: 100% !important; padding: 0 !important; margin: 0 auto !important; }
    #Content img { max-width: 100%; }

    /* Cart */
    #Content .container.cart { padding: 16px; min-height: 0; }
    #Content .container-main-cart { width: 100% !important; min-height: 0; }
    #Content .container-cart-details { min-height: 0; }
    #Content .cart-header { height: auto; min-height: 72px; padding: 14px 16px; flex-wrap: wrap; gap: 6px 16px; }
    #Content .cart-header .h1-cart { margin: 0 !important; line-height: 1.1; }
    #Content .cart-header a { white-space: nowrap; }
    #Content .btn-gold-checkout { max-width: 100%; }

    /* Checkout */
    #billingform .container-checkout50 { min-width: 0 !important; width: 100%; }
    #billingform .contianer-ccinfo { min-width: 0 !important; width: 100% !important; padding: 16px 0 !important; }
    #billingform .cc-card { width: 100% !important; max-width: 550px; min-width: 0 !important; height: auto !important; min-height: 0 !important; margin: 0 auto; padding-bottom: 16px; }
    #billingform .cc-card .cc-magstrip { min-width: 0 !important; }
    #billingform .cc-card .block-content { height: auto !important; }
    #billingform .container-orderinfo { width: 100% !important; max-width: 550px; margin: 0 auto 16px !important; flex-basis: auto !important; min-height: 0 !important; }
    #billingform .order-items { min-width: 0 !important; min-height: 0 !important; }
    #billingform .block-content-3 { min-width: 0 !important; padding: 0 16px !important; }
    #billingform .container-billing-info { width: 100% !important; margin: 0 auto 16px; min-height: 0; }
    #billingform .div-block { min-width: 0 !important; width: 100% !important; }
    #billingform .div-block-4 { display: flex !important; min-height: 0; padding: 8px 16px 16px !important; }
    #billingform .btn-gold { width: 100% !important; max-width: 420px; min-width: 0 !important; margin: 0 auto !important; }
    #billingform h4#npsnotice { width: 100%; margin: 0 auto 16px; }

    /* Payment card: stack card type / number, then month + year + security code */
    #billingform .cc-card fieldset.block-content { padding: 0 24px !important; }
    #billingform .cc-card .container-ccnum-date {
        display: block !important;
        column-count: 1 !important;
        white-space: normal !important;
        max-width: none !important;
        width: 100% !important;
    }
    #billingform .cc-card .container-ccnum-date > div { width: 100% !important; margin: 0 0 12px !important; display: block !important; }
    #billingform .cc-card .container-ccnum-date:nth-child(1) select,
    #billingform .cc-card .container-ccnum-date:nth-child(1) input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
    #billingform .cc-card .div35-cc { width: 100% !important; margin: 0 !important; }
    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutrow,
    #billingform .cc-card .container-ccnum-date:nth-child(2) {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 0 12px;
        margin: 0 !important;
    }
    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutcolumn,
    #billingform .cc-card .container-ccnum-date:nth-child(2) .w-commerce-commercecheckoutcolumn {
        flex: 1 1 calc(33.333% - 12px) !important;
        min-width: 110px;
        padding: 0 !important;
        margin: 0 0 12px !important;
        display: block !important;
    }
    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutcolumn select,
    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutcolumn input,
    #billingform .cc-card .container-ccnum-date:nth-child(2) select,
    #billingform .cc-card .container-ccnum-date:nth-child(2) input { width: 100% !important; max-width: 100% !important; box-sizing: border-box; }
    #billingform .cc-card .icon-cc-sec { display: none !important; }
}

/* ------------------------------------------------------------------ */
/* Phones (landscape) and small tablets                                */
/* ------------------------------------------------------------------ */
@media only screen and (max-width: 767px) {
    /* --- Cart: turn each table row into a labelled card --- */
    #Content .container.cart { padding: 12px; }
    #Content .container-cart-details { padding: 16px !important; }
    #Content .cart-head-row { display: none !important; }

    #Content .container-cart-items:not(.cart-head-row) {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "name name" "price qty" "sub sub";
        gap: 10px 16px;
        min-height: 0 !important;
        height: auto !important;
        padding: 14px 0;
        border-bottom: 1px solid rgba(51, 58, 46, 0.14);
        border-radius: 0;
    }
    #Content .container-cart-items:not(.cart-head-row) > div {
        width: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column;
        align-items: flex-start !important;
        justify-content: flex-start !important;
    }
    #Content .container-cart-items:not(.cart-head-row) .container-cart-tour-item { grid-area: name; }
    #Content .container-cart-items:not(.cart-head-row) .container-cart-unit-price { grid-area: price; }
    #Content .container-cart-items:not(.cart-head-row) .container-cart-persons { grid-area: qty; }
    #Content .container-cart-items:not(.cart-head-row) .container-cart-subtotal { grid-area: sub; flex-direction: row !important; flex-wrap: wrap; align-items: center !important; justify-content: space-between !important; }
    #Content .container-cart-items:not(.cart-head-row) .clear { display: none; }

    #Content .container-cart-items [data-label]::before {
        content: attr(data-label);
        display: block;
        flex-basis: 100%;
        margin-bottom: 4px;
        color: #6e9398;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.6px;
        text-transform: uppercase;
        line-height: 1.2;
    }
    #Content .container-cart-items .cart-tour-package { font-size: 18px; line-height: 1.25; text-align: left !important; margin: 0; }
    #Content .container-cart-items .text-block-12, #Content .container-cart-items .text-block-13 { text-align: left !important; font-size: 16px; }
    #Content .container-cart-items .promo-field { width: 96px !important; margin: 0; }
    #Content .container-cart-items .sub-total { order: 1; }
    #Content .container-cart-items .cart-subtotal { font-size: 20px; text-align: left !important; }
    #Content .container-cart-subtotal .product_delete {
        position: static !important;
        float: none !important;
        margin: 0 !important;
        order: 2;
        display: inline-flex;
        align-items: center;
        padding: 6px;
    }

    #Content .container-cart-notes { margin-top: 8px; }
    #Content .container-cart-notes-info { width: 100% !important; }
    #Content .container-cart-btn-notes { width: 100%; justify-content: center; flex-wrap: wrap; gap: 8px; }
    #Content .btn-olive-cart { margin: 0 !important; flex: 1 1 160px; min-width: 0 !important; }
    #Content .container-cart-total { height: auto !important; min-height: 64px; padding: 4px 0; }
    #Content .cart-total-main { width: 100%; min-width: 0 !important; margin-right: 0 !important; justify-content: center; }
    #Content .btn-gold-checkout { width: 100% !important; min-width: 0 !important; max-width: 100% !important; margin: 0 !important; }
    #Content .container-promo-code-field { height: auto !important; flex-wrap: wrap; gap: 8px; }

    /* --- Checkout --- */
    #billingform { padding: 10px 0 !important; }
    #billingform .cc-card { border-radius: 16px; }
    #billingform .cc-card fieldset.block-content { padding: 0 20px !important; }
    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutcolumn,
    #billingform .cc-card .container-ccnum-date:nth-child(2) .w-commerce-commercecheckoutcolumn {
        flex: 1 1 calc(50% - 12px) !important;
    }
    #billingform select, #billingform input[type="text"], #billingform input[type="password"], #billingform input[type="tel"], #billingform input[type="email"] {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }
    #billingform .label-input { font-size: 13px !important; }
    #billingform li { margin-left: 0 !important; margin-top: 2px !important; }

    #billingform .div-block { flex-direction: column !important; min-height: 0 !important; padding-top: 16px !important; }
    #billingform .customer-info, #billingform .billing-address { width: 100% !important; height: auto !important; max-height: none !important; }
    #billingform .container-customer-info, #billingform .container-billing-address { height: auto !important; padding: 0 20px 8px !important; }
    #billingform .billing-address .w-commerce-commercecheckoutrow { flex-wrap: wrap; }
    #billingform .billing-address .w-commerce-commercecheckoutcolumn { flex: 1 1 45%; min-width: 140px; margin-bottom: 8px; }

    #billingform .order-summary > div[style] { margin: 8px 12px !important; font-size: 14px !important; }
    #billingform .line-item { max-width: none !important; }
    #billingform .text-total { font-size: 26px; }
    #billingform .block-header-4 { padding-right: 16px; padding-left: 16px; }
    #billingform .h4-checkout-main { font-size: 22px; }

    /* --- Order error --- */
    #Content .order-error-body { min-height: 0 !important; padding: 24px 0; }
    #Content .order-error { margin: 24px auto !important; width: min(92%, 440px); padding: 20px; text-align: center; border-radius: 8px; line-height: 1.5; }
    #Content .top_sec .tab1 h2 { font-size: 20px !important; line-height: 1.2 !important; }
}

/* ------------------------------------------------------------------ */
/* Phones (portrait)                                                   */
/* ------------------------------------------------------------------ */
@media only screen and (max-width: 479px) {
    #Content .container.cart { padding: 8px; }
    #Content .container-cart-details { padding: 12px !important; }
    #Content .cart-header { padding: 12px 14px; }
    #Content .cart-header .h1-cart { font-size: 22px !important; text-align: left !important; }
    #Content .container-cart-items .cart-tour-package { font-size: 16px; }
    #Content .container-cart-items:not(.cart-head-row) { gap: 10px 12px; }
    #Content .container-cart-btn-notes { flex-direction: column !important; }
    #Content .btn-olive-cart { width: 100%; flex-basis: auto; }
    #Content h5[style], #Content h4#npsnotice { font-size: 14px !important; line-height: 1.4; padding: 10px !important; border-radius: 6px; }
    #Content h4#npsnotice { font-size: 16px !important; }
    #Content .heading-5 { font-size: 18px; text-align: center; }

    #billingform .cc-card .div35-cc .w-commerce-commercecheckoutcolumn:last-of-type,
    #billingform .cc-card .container-ccnum-date:nth-child(2) .w-commerce-commercecheckoutcolumn:last-of-type { flex-basis: 100% !important; }
    #billingform .billing-address .w-commerce-commercecheckoutcolumn { flex-basis: 100%; }
    #billingform .cc-card fieldset.block-content, #billingform .container-customer-info, #billingform .container-billing-address { padding-left: 14px !important; padding-right: 14px !important; }
    #billingform .text-total { font-size: 22px; }
}

/* ------------------------------------------------------------------ */
/* Order success / ticket page (#ticket). The printable copy            */
/* (#print_area_print) is untouched, so printed tickets stay the same.  */
/* ------------------------------------------------------------------ */
@media only screen and (max-width: 991px) {
    #ticket .top_sec, #ticket .raw_all, #ticket .bottom_sec { width: 100% !important; box-sizing: border-box; }
    #ticket .raw_all { padding: 0 8px 8px; }
    #ticket #print_area { width: 100% !important; max-width: 782px; box-sizing: border-box; }
    #ticket #print_area .order, #ticket #print_area #inn, #ticket #print_area #para, #ticket #print_area #efooter,
    #ticket #print_area #date, #ticket #print_area #greeting, #ticket #print_area #receipt { width: 100% !important; box-sizing: border-box; }
    #ticket #print_area #efooter { height: auto !important; }
    #ticket #print_area img { max-width: 100%; height: auto; }
    #ticket #print_button { display: block; margin: 0 auto 16px !important; }
}

@media only screen and (max-width: 767px) {
    #ticket .top_sec .tab1, #ticket .top_sec .tab2 { width: 100% !important; height: auto !important; float: none; }
    #ticket .top_sec .tab1 h2 { font-size: 20px !important; line-height: 1.3 !important; margin: 10px 0 0 15px !important; }
    #ticket .top_sec .tab1 a { display: inline-block; margin: 0 0 8px 15px !important; }
    #ticket .top_sec .tab2 p { padding: 0 15px 10px !important; font-size: 13px !important; }

    /* Customer detail: QR above the address rows */
    #ticket #print_area .customer-detail.inn-header { padding-right: 0 !important; text-align: center !important; }
    #ticket #print_area #inn > div > div[style*="float: left"] { float: none !important; margin: 10px auto !important; text-align: center; }
    #ticket #print_area .row { float: none !important; width: 100% !important; box-sizing: border-box; overflow: hidden; padding: 4px 12px !important; }
    #ticket #print_area .row label { width: 72px; height: auto !important; }
    #ticket #print_area .row div[style*="width: 250px"] { width: calc(100% - 96px) !important; overflow-wrap: anywhere; }

    /* Line items: description on its own line, three equal numeric columns */
    #ticket #print_area .desc { width: 100% !important; box-sizing: border-box; padding-left: 10px !important; }
    #ticket #print_area .unit, #ticket #print_area .total, #ticket #print_area .total-body { width: 33.333% !important; box-sizing: border-box; margin: 0 !important; padding: 0 6px; }
    #ticket #print_area .inn-header.unit, #ticket #print_area .inn-header.total { height: auto !important; min-height: 25px; font-size: 12px; line-height: 1.2; padding: 6px 4px 4px !important; }
    #ticket #print_area .unit.no-of { text-align: center !important; }
    #ticket #print_area .unit.inn-body, #ticket #print_area .total.inn-body, #ticket #print_area .total-body.inn-body { text-align: right !important; }

    /* Promo code / grand total bars stack */
    #ticket #print_area #gt-left, #ticket #print_area #gt-left2, #ticket #print_area #gt-right, #ticket #print_area #gt-right2 {
        width: 100% !important; box-sizing: border-box; height: auto !important; margin-right: 0 !important; padding: 6px 12px !important;
    }
    #ticket #print_area #gt-right, #ticket #print_area #gt-right2 { text-align: right; }
    #ticket #print_area #gt-left2, #ticket #print_area #gt-right2 { font-size: 13px; }
    /* grand total label and amount stay on one line */
    #ticket #print_area #gt-left { width: 50% !important; }
    #ticket #print_area #gt-right { width: 50% !important; }

    /* Redeem address + notices */
    #ticket #print_area #para { padding: 12px !important; text-align: left !important; }
    #ticket #print_area #para table, #ticket #print_area #para tbody, #ticket #print_area #para tr, #ticket #print_area #para td { display: block; width: 100% !important; box-sizing: border-box; }
    #ticket #print_area #para td { text-align: center !important; padding: 0; }
    #ticket #print_area #para td > div[style*="float: left"] { float: none !important; text-align: center; margin-bottom: 10px; }
    #ticket #print_area #para td img { display: block; width: 100% !important; max-width: 230px; height: auto; margin: 8px auto !important; }
    #ticket #print_area #para p { text-align: left; line-height: 1.45; }

    #ticket #print_area #efooter { padding: 10px 12px !important; font-size: 11px !important; text-align: center; }
    #ticket #print_area #efooter div[style*="text-align:center"] { margin-bottom: 4px; }
    #ticket .bottom_sec p { padding: 10px 12px !important; font-size: 13px !important; line-height: 1.4 !important; }
}

@media only screen and (max-width: 479px) {
    #ticket .raw_all { padding: 0 4px 4px; }
    #ticket #print_area .order { font-size: 14px !important; height: auto !important; padding: 6px 4px !important; }
    #ticket #print_area #greeting { font-size: 15px; padding: 0 8px; }
    #ticket #print_area .inn-header.unit, #ticket #print_area .inn-header.total { font-size: 11px; }
    #ticket #print_area .order-header img { max-width: 100%; }
}
