/**
 * Blue Marine Residence — additions (Sept 2026)
 * Loaded after build/css/style.css (handle hable__style_additions).
 * Reuses the theme's tokens only: navy #030C54 (and its tints), periwinkle
 * #C9D3F0, ABCProphet 300 labels (.abcprophet-light), square corners,
 * .4s ease-in-out.
 */

/* ------------------------------------------------------------------------
 * Apartments table note: "White finish included in the price"
 * template-parts/apartments-price-note.php (above .table-fake)
 * --------------------------------------------------------------------- */
.aptPriceNote {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    margin: 10px 0 0;
    padding: 10px 14px 9px;
    background: rgba(3, 12, 84, .1); /* light blue: the table rows' tap/active state */
    color: #030C54;
    line-height: 1.3;
}

/* navy ring bullet (same shape as the theme's list bullets) */
.aptPriceNote:before {
    content: '';
    -webkit-box-flex: 0;
    -ms-flex: 0 0 12px;
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-right: 10px;
    border: 1px solid #030C54;
    border-radius: 50%;
}

@media only screen and (max-width: 767px) {
    .aptPriceNote {
        margin: 0 0 8px;
        padding: 9px 11px 8px;
    }
}

/* ------------------------------------------------------------------------
 * Floating contact button + panel
 * inc/contact-widget.php, template-parts/contact-widget.php, build/js/contact-widget.js
 * Stacking: above page content and the fixed header bar (10/15), below the
 * cookie banner #bmcc (99990) and fancybox (99992+).
 * --------------------------------------------------------------------- */
.bmContactWidget__toggle {
    position: fixed;
    /* centred at the bottom (no transform, so the animations can use it) */
    left: 0;
    right: 0;
    bottom: 32px;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: 0 auto;
    z-index: 9000;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 16px 22px 15px;
    border: 1px solid #030C54;
    border-radius: 0;
    background: #030C54;
    color: #fff;
    font-family: ABCProphet;
    font-weight: 300;
    font-size: 1.2rem;
    letter-spacing: .05em;
    line-height: 1;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    -webkit-box-shadow: 0 8px 24px rgba(3, 12, 84, .14);
    box-shadow: 0 8px 24px rgba(3, 12, 84, .14);
    transition: background-color .4s ease-in-out, opacity .4s ease-in-out, visibility .4s ease-in-out, -webkit-transform .4s ease-in-out;
    transition: background-color .4s ease-in-out, opacity .4s ease-in-out, visibility .4s ease-in-out, transform .4s ease-in-out;
}

.bmContactWidget__toggle:hover,
.bmContactWidget__toggle:focus {
    background: #0d1e7a; /* cookie-consent --bmcc-navy-light */
    color: #fff;
    text-decoration: none;
}

/* focus rings with real contrast: white inset on the navy button, navy on the white panel */
.bmContactWidget__toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: -6px;
}

.bmContactWidget__close:focus-visible,
.bmContactWidget__goto:focus-visible,
.bmContactWidget__contact a:focus-visible {
    outline: 2px solid #030C54;
    outline-offset: 2px;
}

.bmContactWidget__icon {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    margin-right: 12px;
    overflow: visible; /* lets the flap open above the envelope */
}

/* Attention: slides in shortly after load, then every 4.5s a soft navy "ping"
   around the button while the envelope wiggles and its flap opens. Paused
   while hovered or while the panel is open. */
.bmContactWidget__toggle {
    -webkit-animation: bmContactWidgetIn .7s cubic-bezier(.16, 1, .3, 1) 1.2s both, bmContactWidgetPing 4.5s ease-out 2.4s infinite;
    animation: bmContactWidgetIn .7s cubic-bezier(.16, 1, .3, 1) 1.2s both, bmContactWidgetPing 4.5s ease-out 2.4s infinite;
}

.bmContactWidget__icon {
    -webkit-transform-origin: 50% 100%;
    transform-origin: 50% 100%;
    -webkit-animation: bmContactWidgetMail 4.5s ease-in-out 2.4s infinite;
    animation: bmContactWidgetMail 4.5s ease-in-out 2.4s infinite;
}

.bmContactWidget__flap {
    -webkit-transform-box: fill-box;
    transform-box: fill-box;
    -webkit-transform-origin: 50% 0;
    transform-origin: 50% 0;
    -webkit-animation: bmContactWidgetFlap 4.5s ease-in-out 2.4s infinite;
    animation: bmContactWidgetFlap 4.5s ease-in-out 2.4s infinite;
}

.bmContactWidget__toggle:hover,
.bmContactWidget.is-open .bmContactWidget__toggle {
    -webkit-animation: bmContactWidgetIn .7s cubic-bezier(.16, 1, .3, 1) 1.2s both;
    animation: bmContactWidgetIn .7s cubic-bezier(.16, 1, .3, 1) 1.2s both;
}

.bmContactWidget__toggle:hover .bmContactWidget__icon,
.bmContactWidget__toggle:hover .bmContactWidget__flap,
.bmContactWidget.is-open .bmContactWidget__icon,
.bmContactWidget.is-open .bmContactWidget__flap {
    -webkit-animation: none;
    animation: none;
}

@-webkit-keyframes bmContactWidgetMail {
    0%, 22%, 100% { -webkit-transform: none; transform: none; }
    4% { -webkit-transform: translateY(-3px) rotate(-10deg); transform: translateY(-3px) rotate(-10deg); }
    9% { -webkit-transform: translateY(-3px) rotate(8deg); transform: translateY(-3px) rotate(8deg); }
    14% { -webkit-transform: translateY(-1px) rotate(-5deg); transform: translateY(-1px) rotate(-5deg); }
    18% { -webkit-transform: rotate(2deg); transform: rotate(2deg); }
}

@keyframes bmContactWidgetMail {
    0%, 22%, 100% { -webkit-transform: none; transform: none; }
    4% { -webkit-transform: translateY(-3px) rotate(-10deg); transform: translateY(-3px) rotate(-10deg); }
    9% { -webkit-transform: translateY(-3px) rotate(8deg); transform: translateY(-3px) rotate(8deg); }
    14% { -webkit-transform: translateY(-1px) rotate(-5deg); transform: translateY(-1px) rotate(-5deg); }
    18% { -webkit-transform: rotate(2deg); transform: rotate(2deg); }
}

/* the envelope flap flips open and closes again */
@-webkit-keyframes bmContactWidgetFlap {
    0%, 26%, 100% { -webkit-transform: none; transform: none; }
    8%, 16% { -webkit-transform: scaleY(-1); transform: scaleY(-1); }
}

@keyframes bmContactWidgetFlap {
    0%, 26%, 100% { -webkit-transform: none; transform: none; }
    8%, 16% { -webkit-transform: scaleY(-1); transform: scaleY(-1); }
}

@-webkit-keyframes bmContactWidgetIn {
    from { opacity: 0; -webkit-transform: translateY(24px); transform: translateY(24px); }
    to { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes bmContactWidgetIn {
    from { opacity: 0; -webkit-transform: translateY(24px); transform: translateY(24px); }
    to { opacity: 1; -webkit-transform: none; transform: none; }
}

@-webkit-keyframes bmContactWidgetPing {
    0% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 0 rgba(3, 12, 84, .45); }
    35% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 14px rgba(3, 12, 84, 0); }
    100% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 14px rgba(3, 12, 84, 0); }
}

@keyframes bmContactWidgetPing {
    0% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 0 rgba(3, 12, 84, .45); }
    35% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 14px rgba(3, 12, 84, 0); }
    100% { box-shadow: 0 8px 24px rgba(3, 12, 84, .14), 0 0 0 14px rgba(3, 12, 84, 0); }
}

/* Hidden while: the page's own form is on screen (scroll mode), the mobile
   menu is open, or the cookie banner is showing (it shares the bottom-left
   corner; the button must never cover it). */
.bmContactWidget.is-away .bmContactWidget__toggle,
html.mobileNav--open .bmContactWidget__toggle,
#bmcc.bmcc--visible ~ .bmContactWidget .bmContactWidget__toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    -webkit-animation: none;
    animation: none;
    -webkit-transform: translateY(8px);
    transform: translateY(8px);
}

.bmContactWidget__backdrop[hidden],
.bmContactWidget__panel[hidden] {
    display: none !important;
}

.bmContactWidget__backdrop {
    display: none;
}

.bmContactWidget__panel {
    position: fixed;
    left: 0; /* centred above the button */
    right: 0;
    margin: 0 auto;
    bottom: 96px;
    z-index: 9001;
    width: 400px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    -ms-scroll-chaining: none;
    overscroll-behavior: contain;
    padding: 28px 30px 26px;
    border: 1px solid rgba(3, 12, 84, .13);
    border-radius: 0;
    background: rgba(255, 255, 255, .97);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-box-shadow: 0 0 0 1px rgba(3, 12, 84, .07), 0 8px 24px rgba(3, 12, 84, .08), 0 32px 80px rgba(3, 12, 84, .14);
    box-shadow: 0 0 0 1px rgba(3, 12, 84, .07), 0 8px 24px rgba(3, 12, 84, .08), 0 32px 80px rgba(3, 12, 84, .14);
    color: #030C54;
    opacity: 0;
    -webkit-transform: translateY(16px);
    transform: translateY(16px);
    transition: opacity .4s ease-in-out, -webkit-transform .4s ease-in-out;
    transition: opacity .4s ease-in-out, transform .4s ease-in-out;
}

/* periwinkle top line, as on the cookie-consent card */
.bmContactWidget__panel:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #C9D3F0;
}

.bmContactWidget.is-open .bmContactWidget__panel {
    opacity: 1;
    -webkit-transform: none;
    transform: none;
}

.bmContactWidget__head {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    margin-bottom: 20px;
}

.bmContactWidget__title {
    margin: 0 16px 0 0;
    font-family: ABCProphet;
    font-weight: 100;
    font-size: 2.2rem;
    line-height: 1.15;
}

.bmContactWidget__title:focus {
    outline: 0;
}

.bmContactWidget__close {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: -6px -10px 0 0;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    color: #030C54;
    cursor: pointer;
    transition: border-color .4s ease-in-out;
}

.bmContactWidget__close:hover {
    border-color: rgba(3, 12, 84, .1);
}

.bmContactWidget__contacts {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
    grid-gap: 14px 20px;
    gap: 14px 20px;
    margin: 0 0 24px;
    padding: 0 0 20px;
    list-style: none;
    border-bottom: 1px solid rgba(3, 12, 84, .2);
    letter-spacing: .02em;
}

.bmContactWidget__contact a {
    display: block;
    padding: 4px 0; /* ~24px tall tap targets */
    color: #030C54;
    text-decoration: none;
    word-break: break-word;
}

.bmContactWidget__contact a:hover {
    text-decoration: underline;
}

/* "Write us" link to the page's own form (pages that already show it) */
.bmContactWidget__goto {
    padding: 6px 0; /* comfortable tap target */
}

.bmContactWidget__name.h4 {
    margin: 0 0 2px;
    font-size: 1.5rem;
    line-height: 1.1;
}

/* the shared CF7 form, tightened for the panel */
.bmContactWidget .cForm__field {
    margin-bottom: 22px;
}

.bmContactWidget .cForm__field--textarea {
    margin-bottom: 16px;
}

.bmContactWidget .cForm__field--acceptance {
    margin-bottom: 7px;
}

.bmContactWidget .cForm__field--submit {
    margin-bottom: 0;
    padding-top: 18px;
}

.bmContactWidget .cFormTY {
    margin: 30px auto 10px;
}

@media only screen and (min-width: 768px) {
    .bmContactWidget__backdrop {
        display: none !important;
    }
}

@media only screen and (max-width: 767px) {
    .bmContactWidget__toggle {
        bottom: 16px;
        bottom: calc(16px + env(safe-area-inset-bottom));
        padding: 15px 18px 14px;
    }

    /* keep the footer's last row (incl. the cookie "Privacy settings" link)
       clear of the button at the very end of the page */
    .siteFooter__bottom {
        padding-bottom: 72px;
        padding-bottom: calc(72px + env(safe-area-inset-bottom));
    }

    .bmContactWidget__backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9000;
        background: rgba(3, 12, 84, .2);
        opacity: 0;
        transition: opacity .4s ease-in-out;
    }

    .bmContactWidget.is-open .bmContactWidget__backdrop {
        opacity: 1;
    }

    /* bottom sheet */
    .bmContactWidget__panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        max-width: none;
        max-height: 88vh;
        max-height: 88dvh;
        padding: 24px 20px 22px;
        padding-bottom: calc(22px + env(safe-area-inset-bottom));
        -webkit-transform: translateY(24px);
        transform: translateY(24px);
    }

    html.bmContactWidget-open,
    html.bmContactWidget-open body {
        overflow: hidden;
    }

    /* 16px stops iOS from zooming into the fields */
    .bmContactWidget input,
    .bmContactWidget textarea {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bmContactWidget__toggle,
    .bmContactWidget__icon,
    .bmContactWidget__flap,
    .bmContactWidget__panel,
    .bmContactWidget__backdrop {
        transition: none;
        -webkit-animation: none !important;
        animation: none !important;
    }
}

/* ------------------------------------------------------------------------
 * Floating panel: prominent Send button + compact layout on phones
 * --------------------------------------------------------------------- */
.bmContactWidget .cForm__field--submit {
    padding-top: 14px;
}

.bmContactWidget .wpcf7-submit.btn-primary {
    width: 100%;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 16px 20px 15px;
    background: #030C54;
    color: #fff;
    letter-spacing: .08em;
    transition: background-color .4s ease-in-out, opacity .4s ease-in-out;
}

.bmContactWidget .wpcf7-submit.btn-primary:hover,
.bmContactWidget .wpcf7-submit.btn-primary:focus-visible {
    background: #0d1e7a;
}

.bmContactWidget .wpcf7-submit.btn-primary svg,
.bmContactWidget .wpcf7-submit.btn-primary:after {
    display: none;
}

/* disabled until the GDPR box is ticked — still clearly a button */
.bmContactWidget .wpcf7-submit.btn-primary[disabled] {
    opacity: .45;
}

@media only screen and (max-width: 767px) {
    .bmContactWidget__panel {
        max-height: 92vh;
        max-height: 92dvh;
        padding: 16px 16px 14px;
        padding-bottom: calc(14px + env(safe-area-inset-bottom));
    }

    .bmContactWidget__head {
        margin-bottom: 10px;
    }

    .bmContactWidget__title {
        font-size: 1.8rem;
    }

    .bmContactWidget__contacts {
        grid-gap: 4px 16px;
        gap: 4px 16px;
        margin-bottom: 12px;
        padding-bottom: 10px;
    }

    .bmContactWidget__name.h4 {
        font-size: 1.3rem;
    }

    .bmContactWidget__contact a {
        padding: 3px 0;
    }

    .bmContactWidget .cForm__field {
        margin-bottom: 12px;
    }

    .bmContactWidget .cForm__field label {
        margin-bottom: 0;
    }

    .bmContactWidget .cForm__field input,
    .bmContactWidget .cForm__field textarea {
        padding: 3px 0;
    }

    .bmContactWidget .cForm__field--textarea {
        margin-bottom: 10px;
    }

    .bmContactWidget .cForm__field--acceptance {
        margin-bottom: 4px;
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .bmContactWidget .cForm__field--submit {
        padding-top: 10px;
    }

    .bmContactWidget .wpcf7-submit.btn-primary {
        padding: 15px 20px 14px;
    }
}
