/**
 * Blue Marine Residence — Apartments table UX (inc/apartments-table.php).
 * Site language: navy #030C54, ABCProphet 300 uppercase labels (.05em),
 * thin arrows, hairlines, square corners.
 */

/* the whole list in the page, no 395px inner scroll box */
.bmAptUx .table-fake-row-container {
    max-height: none !important;
    overflow: visible !important;
}

/* "13 pieejami · 2 rezervēti · 4 pārdoti" */
.bmAptSummary {
    margin: 22px 0 14px;
    color: #030C54;
    font-family: ABCProphet;
    font-weight: 300;
    font-size: 1.3rem;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* row actions: "Plāns →" and "Pieteikties apskatei" */
.bmAptActions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    font-family: ABCProphet;
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    white-space: nowrap;
}

.bmAptActions__plan {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.bmAptActions__plan.btn {
    color: inherit;
    font-size: 1.1rem;
    white-space: nowrap;
}

.bmAptActions__plan.btn svg {
    margin-left: 12px;
}

.bmAptActions__plan.btn:after {
    border-color: currentColor;
}

/* "Pieteikties ⟶◯": the site's small arrow button (.btn-primary--s) */
.bmAptActions__book.btn {
    margin: 0 0 0 24px;
    color: inherit;
    font-size: 1.1rem;
    white-space: nowrap;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
}

.bmAptActions__book.btn svg {
    margin-left: 12px;
}

.bmAptActions__book.btn:after {
    border-color: currentColor;
}

@media (hover: hover) and (pointer: fine) {
    .apartment-row:hover .bmAptActions__plan svg {
        transform: translateX(3px);
    }

    .apartment-row:hover .bmAptActions__book svg {
        transform: translateX(3px);
    }
}

/* desktop/tablet table: make room for the actions column */
@media only screen and (min-width: 768px) {
    .bmAptUx .table-fake-col:nth-of-type(1) { width: 7%; }
    .bmAptUx .table-fake-col:nth-of-type(2),
    .bmAptUx .table-fake-col:nth-of-type(3) { width: 9%; }
    .bmAptUx .table-fake-col:nth-of-type(4) { width: 13%; }
    .bmAptUx .table-fake-col:nth-of-type(5) { width: 18%; }
    .bmAptUx .table-fake-col:nth-of-type(6) { width: 16%; }
    .bmAptUx .table-fake-col:nth-of-type(7) { width: 16%; }
    .bmAptUx .bmAptActions { width: 12%; padding-right: 5px; }
    .bmAptUx .table-fake-row-first .table-fake-col { white-space: nowrap; } /* one-line headers */
    .bmAptUx .table-fake-row-first .table-fake-col:nth-of-type(7) { text-align: right; padding-right: 5px; }
}

/* narrower screens: slightly smaller headers so they stay on one line */
@media only screen and (min-width: 768px) and (max-width: 1199px) {
    .bmAptUx .table-fake-row-first .table-fake-col { font-size: 1.1rem; letter-spacing: .03em; }
}

/* phones: actions as the card's last line, full width */
@media only screen and (max-width: 767px) {
    .bmAptUx .apartment-row .bmAptActions {
        grid-column: 1 / -1;
        -webkit-box-pack: end;
        -ms-flex-pack: end;
        justify-content: flex-end;
        padding: 8px 11px 8px;
        border-top: 1px solid rgba(3, 12, 84, .14);
        font-size: 1.1rem;
    }

    .bmAptUx .apartment-row .bmAptActions__book.btn {
        margin-left: auto;
        padding: 6px 0;
    }

    .bmAptSummary {
        font-size: 1.2rem;
    }

    /* sold without a plan: no empty strip */
    .bmAptUx .apartment-row .bmAptActions:empty {
        display: none;
    }
}

/* ------------------------------------------------------------------
   Enquiry form next to an apartment plan in the PDF viewer
   ------------------------------------------------------------------ */
.bmAptEnquiry {
    position: fixed;
    top: var(--bmAptEnquiryTop, 89px);
    right: 0;
    bottom: 0;
    z-index: 99981; /* above the viewer (99980), under the cookie banner */
    width: 380px;
    overflow-y: auto;
    background: #fff;
    border-left: 1px solid rgba(3, 12, 84, .13);
    color: #030C54;
}

.bmAptEnquiry[hidden] {
    display: none;
}

html.bmAptEnquiry-on .bmPdfViewer__body {
    margin-right: 380px;
}

.bmAptEnquiry__handle {
    display: none;
}

.bmAptEnquiry__body {
    padding: 34px 36px 40px;
}

.bmAptEnquiry__eyebrow {
    margin: 0 0 8px;
    font-family: ABCProphet;
    font-weight: 300;
    font-size: 1.1rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    opacity: .5;
}

.bmAptEnquiry__title {
    margin: 0 0 26px;
    font-family: ABCProphet;
    font-weight: 100;
    font-size: 2.4rem;
    line-height: 1.15;
}

/* the shared lead form, compact like the Contact us panel: name, phone, e-mail */
.bmAptEnquiry .cForm__field { margin-bottom: 14px; }
.bmAptEnquiry .cForm__field label { margin-bottom: 2px; font-size: 1.1rem; }
.bmAptEnquiry .cForm__field--textarea { display: none; }
.bmAptEnquiry .cForm__field--acceptance { margin-bottom: 3px; }
.bmAptEnquiry .cForm__field--acceptance label,
.bmAptEnquiry .cForm__field--acceptance .wpcf7-list-item-label { margin: 0; font-size: 1rem; line-height: 1.35; }
.bmAptEnquiry .cForm__field--acceptance input[type=checkbox] { width: 11px; height: 11px; top: 2px; margin-right: 5px; }
.bmAptEnquiry .cForm__field--acceptance input[type=checkbox]:after { top: 2px; right: 2px; bottom: 2px; left: 2px; }
.bmAptEnquiry .wpcf7-not-valid-tip { font-size: 1rem; }
.bmAptEnquiry .cForm__field--submit { margin: 0; padding-top: 12px; }
.bmAptEnquiry .wpcf7-submit.btn-primary {
    width: 100%;
    justify-content: center;
    padding: 13px 18px 12px;
    background: #192348;
    color: #fff;
    letter-spacing: .08em;
}
.bmAptEnquiry .wpcf7-submit.btn-primary svg,
.bmAptEnquiry .wpcf7-submit.btn-primary:after { display: none; }
.bmAptEnquiry .wpcf7-submit.btn-primary[disabled] { opacity: .45; }

@media only screen and (max-width: 1024px) {
    .bmAptEnquiry { width: 320px; }
    html.bmAptEnquiry-on .bmPdfViewer__body { margin-right: 320px; }
    .bmAptEnquiry__body { padding: 26px 24px 32px; }
}

/* phones: a bar at the bottom that opens into the form */
@media only screen and (max-width: 767px) {
    .bmAptEnquiry {
        top: auto;
        left: 0;
        width: auto;
        max-height: calc(100% - var(--bmAptEnquiryTop, 61px));
        overflow: hidden;
        border-left: 0;
        border-top: 1px solid rgba(3, 12, 84, .13);
        box-shadow: 0 -6px 18px rgba(3, 12, 84, .08);
        display: flex;
        flex-direction: column;
    }

    .bmAptEnquiry[hidden] {
        display: none;
    }

    html.bmAptEnquiry-on .bmPdfViewer__body {
        margin-right: 0;
        margin-bottom: 52px;
    }

    .bmAptEnquiry__handle {
        display: flex;
        flex-shrink: 0;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        min-height: 52px;
        margin: 0;
        padding: 0 20px;
        border: 0;
        border-radius: 0;
        background: #fff;
        color: #030C54;
        font-family: ABCProphet;
        font-weight: 300;
        font-size: 1.2rem;
        letter-spacing: .05em;
        text-transform: uppercase;
        cursor: pointer;
        touch-action: manipulation;
    }

    .bmAptEnquiry__handle svg {
        transition: transform .4s ease-in-out;
    }

    .bmAptEnquiry.is-expanded .bmAptEnquiry__handle svg {
        transform: rotate(180deg);
    }

    .bmAptEnquiry__body {
        display: none;
        overflow-y: auto;
        padding: 4px 20px 24px;
        padding-bottom: calc(24px + env(safe-area-inset-bottom));
    }

    .bmAptEnquiry.is-expanded .bmAptEnquiry__body {
        display: block;
    }

    .bmAptEnquiry__eyebrow,
    .bmAptEnquiry__title {
        display: none; /* the bar says it; the number is in the viewer's title */
    }
}
