/* Mobile responsive overrides for the La Douce Pluie site.
   Loaded after the Homepage-Builder-generated CSS, which uses fixed
   px/cm widths (and per-page inline style overrides), so most rules
   here need !important to win the cascade on small screens. */

* {
    box-sizing: border-box;
}

/* Fixed booking bar shown only on mobile (see @media block below). */
.hpb-mobile-cta {
    display: none;
}

/* LINE reservation box on reserve.html (applies on desktop too). */
.hpb-line-reserve {
    background-color: #E8F8EF;
    border: 1px solid #06C755;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    text-align: center;
}

.hpb-line-reserve-btn {
    display: inline-block;
    margin-bottom: 12px;
}

.hpb-line-reserve-note {
    font-weight: bold;
    text-align: center;
    margin: 8px 0 4px 0 !important;
}

.hpb-line-reserve-list {
    display: inline-block;
    text-align: left;
    margin: 0 auto 8px auto;
    padding-left: 1.2em;
}

.hpb-line-reserve-list li {
    line-height: 1.6;
}

@media screen and (max-width: 768px) {

    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    body {
        padding-bottom: 56px !important;
    }

    .hpb-mobile-cta {
        display: flex !important;
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.15);
    }

    .hpb-mobile-cta a {
        flex: 1;
        display: block;
        text-align: center;
        padding: 14px 0;
        font-weight: bold;
        font-size: 15px;
        text-decoration: none !important;
        color: #ffffff !important;
    }

    .hpb-mobile-cta-tel {
        background-color: #A67D9A;
    }

    .hpb-mobile-cta-web {
        background-color: #D1459F;
    }

    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* ---- container / overall width ---- */
    #hpb-container {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    /* ---- header ---- */
    #hpb-header {
        height: auto !important;
        padding: 10px 0 !important;
    }

    #hpb-headerMain,
    #hpb-headerLogo,
    #hpb-headerExtra1,
    #hpb-headerExtra2 {
        float: none !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        text-align: center !important;
    }

    #hpb-headerMain h1 {
        padding: 10px 12px 0 12px !important;
        text-align: center !important;
    }

    #hpb-headerMain h1 img {
        max-width: 85% !important;
        height: auto !important;
    }

    #hpb-headerExtra1 p.tel,
    #hpb-headerExtra1 p.address {
        text-align: center !important;
        padding-right: 0 !important;
    }

    #hpb-headerExtra1 p.tel span {
        text-align: center !important;
    }

    /* the tel/address block is dropped from the header on mobile; the
       aside's shop-info block already shows the same phone/address
       further down the page. */
    #hpb-headerExtra1 {
        display: none !important;
    }

    /* ---- navigation ---- */
    /* #hpb-nav sits after #hpb-wrapper in the markup (it only looked
       "near the top" on desktop because it was position:absolute).
       Reflow #hpb-inner as a column flex box so the nav can be
       reordered to the top on mobile via `order`. */
    #hpb-inner {
        padding-top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: flex !important;
        flex-direction: column !important;
    }

    #hpb-wrapper {
        order: 2 !important;
    }

    #hpb-nav {
        order: 1 !important;
    }

    #hpb-aside {
        order: 3 !important;
    }

    /* stray <br> tags used for manual spacing in the desktop layout;
       in the mobile flex column they just add extra empty gaps */
    #hpb-inner > br,
    #hpb-wrapper > br {
        display: none !important;
    }

    /* some pages set a fixed cm width inline on these elements too */
    #hpb-headerMain h1,
    #contact,
    .hpb-lay-special0 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* top-page slideshow: bleed edge-to-edge, breaking out of
       #hpb-wrapper's left/right padding */
    .hpb-photomotion {
        width: auto !important;
        max-width: none !important;
        margin-left: -14px !important;
        margin-right: -14px !important;
    }

    #hpb-nav {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    #hpb-nav ul {
        display: flex !important;
        flex-wrap: wrap !important;
    }

    #hpb-nav li {
        width: 33.333% !important;
        height: auto !important;
        float: none !important;
        border-bottom: 1px solid #ffffff !important;
    }

    #hpb-nav li a {
        height: auto !important;
        padding: 8px 0 !important;
    }

    /* shop info box: remove outer border on mobile */
    #shopinfo {
        border: none !important;
    }

    /* on inner pages, hide the Facebook/HotPepper/LINE promo block in
       shop info and keep just the address/phone/hours paragraph;
       index.html and access.html don't have this wrapper, so they
       keep showing the full block */
    .hpb-shopinfo-extra {
        display: none !important;
    }

    /* LINE QR code: only useful when viewing on a desktop screen and
       scanning with a phone, so hide it when already browsing on
       mobile (index.html / access.html keep the full shop info block,
       including this image, otherwise). */
    #shopinfo img[src*="qr-official.line.me"] {
        display: none !important;
    }

    /* ---- main two-column layout -> stacked ---- */
    #hpb-wrapper,
    #hpb-aside {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    #hpb-title,
    #hpb-main {
        width: 100% !important;
    }

    /* top page hero image */
    .hpb-layoutset-01 #hpb-title h2 {
        height: 150px !important;
        background-size: contain !important;
    }

    /* ---- menu / price tables: stack image + text ---- */
    table {
        width: 100% !important;
    }

    .hpb-dp-tb1,
    .hpb-dp-tb1 tbody,
    .hpb-dp-tb1 tr {
        display: block !important;
        width: 100% !important;
    }

    .hpb-dp-tb1-cell1,
    .hpb-dp-tb1-cell2 {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        text-align: left !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .hpb-dp-tb1-cell2 img {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
    }

    /* menu.html: Aromatherapy / Reflexology photos, a bit smaller and centered */
    .hpb-dp-tb1-cell2 img[src="DSC009273.jpg"],
    .hpb-dp-tb1-cell2 img[src="DSC008894.jpg"] {
        max-width: 60% !important;
        float: none !important;
        display: block !important;
        margin: 0 auto !important;
    }

    #menu .item {
        width: 100% !important;
        float: none !important;
    }

    #coupon-off,
    #coupon-limit {
        float: none !important;
        width: 100% !important;
    }

    /* ---- forms (reserve page) ---- */
    textarea,
    input.l,
    input.m,
    input.s {
        width: 100% !important;
    }

    /* ---- footer ---- */
    #hpb-footerExtra1 {
        position: static !important;
        text-align: center !important;
    }

    #hpb-footerMain {
        padding-top: 20px !important;
    }
}
