/* ── Book-a-site-visit popup ─────────────────────────────────────────────── */

.pmh-sv {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.pmh-sv[hidden] { display: none !important; }

.pmh-sv-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 14, 20, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pmh-sv-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 22px;
    padding: 24px 24px 22px;
    box-shadow: 0 28px 70px rgba(7, 27, 58, .3);
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    animation: pmhSvIn .18s ease;
}

@keyframes pmhSvIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pmh-sv-x {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #8b93a7;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.pmh-sv-x:hover { background: #f2f4f8; color: #373e4f; }

.pmh-sv-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #23293a;
}
.pmh-sv-sub {
    margin: 4px 0 0;
    font-size: 13px;
    line-height: 1.5;
    color: #6d7998;
}

.pmh-sv-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.pmh-sv-form input,
.pmh-sv-form textarea {
    width: 100%;
    border: 1px solid #d9dded;
    border-radius: 14px;
    padding: 11px 13px;
    font-size: 14px;
    font-family: inherit;
    color: #23293a;
    background: #fff;
    outline: none;
}

.pmh-sv-form input:focus,
.pmh-sv-form textarea:focus {
    border-color: #b98a2f;
    box-shadow: 0 0 0 3px rgba(185, 138, 47, .12);
}

.pmh-sv-form textarea { resize: vertical; min-height: 54px; }

.pmh-sv-error {
    margin: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: #b3261e;
}

.pmh-sv-submit {
    margin-top: 2px;
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #b98a2f, #e0b25c);
    transition: filter .18s ease, transform .18s ease;
}

.pmh-sv-submit:hover { filter: brightness(1.05); transform: translateY(-1px); }
.pmh-sv-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.pmh-sv-done { text-align: center; padding: 12px 4px 4px; }

.pmh-sv-check {
    width: 52px;
    height: 52px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #4caf7d, #7ed3a4);
}

.pmh-sv-done-title { margin: 0; font-size: 17px; font-weight: 700; color: #23293a; }
.pmh-sv-done-sub { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: #6d7998; }
.pmh-sv-done-auto { margin: 12px 0 0; font-size: 11.5px; color: #a2a8b8; }

@media (max-width: 480px) {
    .pmh-sv { padding: 12px; align-items: flex-end; }
    .pmh-sv-card { max-width: none; border-radius: 20px; padding: 20px 18px 18px; }
}

/* ── Mobile floating "Book a visit" button ─────────────────────────────────
   Always-visible contact entry on phones/tablets; hidden on desktop (the
   chat rail already carries a Book-visit bar there) and while the mobile
   home-chat takeover is open. */
.pmh-sv-fab {
    display: none;
    position: fixed;
    right: 14px;
    bottom: 14px;
    z-index: 1500; /* below the modal overlay (2000) */
    align-items: center;
    gap: 6px;
    border: none;
    border-radius: 999px;
    padding: 9px 14px 9px 12px;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    background: linear-gradient(135deg, #b98a2f, #e0b25c);
    box-shadow: 0 8px 20px rgba(185, 138, 47, .4);
    transition: transform .18s ease, box-shadow .18s ease;
}

.pmh-sv-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(185, 138, 47, .45); }
.pmh-sv-fab:active { transform: translateY(0); }

body.pmh-home-chat-open .pmh-sv-fab { display: none !important; }

@media (max-width: 1199.98px) {
    .pmh-sv-fab { display: inline-flex; }

    /* The floating button covers the same action, so the in-chat visit bar
       is redundant on search and detail pages at this width. Scoped to their
       rails — the home chat keeps the bar because the FAB hides during the
       mobile chat takeover. */
    #pmh-ai-col .pmh-ai-visit-bar,
    .pmh-detail-rail .pmh-ai-visit-bar { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
    .pmh-sv-card { animation: none; }
    .pmh-sv-fab { transition: none; }
}
