/* ══════════════════════════════════════════════════════════════
   Lead Form — Dialog, Contact Card, Mobile Bar
   ══════════════════════════════════════════════════════════════ */

/* ── Contact Card ────────────────────────────────────────────── */

.np-contact-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 0.25rem;
}

.np-contact-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.15s;
}

.np-contact-phone:hover {
    color: #4a7cff;
}

.np-contact-phone svg {
    flex-shrink: 0;
}

/* ── Form Dialog ─────────────────────────────────────────────── */

dialog.np-lead-dialog {
    border: none;
    border-radius: 16px;
    padding: 0;
    max-width: 420px;
    width: calc(100% - 2rem);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    background: #fff;
    animation: np-modal-fade-in 200ms ease-out;
}

dialog.np-lead-dialog::backdrop {
    background: rgba(0, 0, 0, 0.5);
    animation: np-backdrop-fade-in 200ms ease-out;
}

.np-lead-dialog__content {
    position: relative;
    padding: 2rem;
}

.np-lead-dialog__close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}

.np-lead-dialog__close:hover {
    background: #f0f0f0;
    color: #1a1a1a;
}

.np-lead-dialog__title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.25rem;
}

.np-lead-dialog__subtext {
    font-size: 0.875rem;
    color: #777;
    margin: 0 0 1.25rem;
}

/* ── Form fields (inside dialog) ─────────────────────────────── */

.np-lead-form {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.np-lead-form .np-form-field input,
.np-lead-form .np-form-field textarea {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    color: #1a1a1a;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.np-lead-form .np-form-field input:focus,
.np-lead-form .np-form-field textarea:focus {
    outline: none;
    border-color: #4a7cff;
    box-shadow: 0 0 0 3px rgba(74, 124, 255, 0.12);
    background: #fff;
}

.np-lead-form .np-form-field textarea {
    resize: vertical;
    min-height: 60px;
}

/* ── intl-tel-input v25 wrapper sizing ───────────────────────────
   v25 ships an inline anchored dropdown with built-in country search
   when `useFullscreenPopup: false`. Almost no overrides are needed;
   we only match the input's border-radius/background and let the
   library handle dropdown positioning, scrolling, and z-index. */

.np-lead-form .np-form-field--phone .iti {
    display: block;
    width: 100%;
}

/* The lib reserves left padding on the tel input for the selected-country
   chip (separateDialCode mode). Our generic `.np-form-field input` rule
   uses padding: 0.625rem 0.75rem, which would otherwise outscore the lib
   and let typed digits render under the chip — keep the lib's left padding. */
.np-lead-form .np-form-field--phone .iti__tel-input {
    padding-top: 0.625rem;
    padding-right: 0.75rem;
    padding-bottom: 0.625rem;
}

.np-lead-form .np-form-field--phone .iti__selected-country-primary {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.np-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #444;
    line-height: 1.35;
    cursor: pointer;
    user-select: none;
    padding: 0.125rem 0;
}

.np-form-checkbox input[type="checkbox"] {
    flex: 0 0 auto;
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    accent-color: #4a7cff;
    cursor: pointer;
}

.np-lead-submit-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #4a7cff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0.25rem;
}

.np-lead-submit-btn:hover {
    background: #3a65d4;
}

.np-lead-submit-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

/* ── Form messages ───────────────────────────────────────────── */

.np-form-message {
    font-size: 0.8125rem;
    min-height: 0;
    transition: min-height 0.15s;
}

.np-form-message:empty {
    display: none;
}

.np-form-message.error {
    color: #c62828;
}

.np-form-message.success {
    color: #2e7d32;
}

.np-form-disclaimer {
    font-size: 0.75rem;
    color: #999;
    text-align: center;
    margin: 0.6rem 0 0;
}

.np-form-disclaimer--reassure + .np-form-disclaimer--reassure {
    margin-top: 0.15rem;
}

/* ── Success confirmation (inside dialog) ────────────────────── */

.np-lead-dialog__success {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1rem 0;
}

.np-modal__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.np-modal__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem;
}

.np-modal__body {
    font-size: 0.9375rem;
    color: #777;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.np-modal__close-btn {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #4a7cff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.np-modal__close-btn:hover {
    background: #3a65d4;
}

/* ── Sticky Mobile Bottom Bar ────────────────────────────────── */

.np-mobile-bar {
    display: none;
}

@media (max-width: 899px) {
    .np-mobile-bar {
        display: flex;
        gap: 0.5rem;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: #fff;
        padding: 0.75rem 1rem;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
    }

    /* Prevent page content from being hidden behind the bar */
    body.single-listing {
        padding-bottom: 70px;
    }
}

.np-mobile-bar__contact {
    flex: 1;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #4a7cff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.np-mobile-bar__contact:hover {
    background: #3a65d4;
}

/* ── WhatsApp Button (sidebar + mobile bar) ──────────────────── */

.np-whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #25d366;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.np-whatsapp-btn:hover {
    background: #1fb855;
    color: #fff;
}

.np-whatsapp-btn svg {
    flex-shrink: 0;
}

.np-mobile-bar__whatsapp {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #fff;
    background: #25d366;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

.np-mobile-bar__whatsapp:hover {
    background: #1fb855;
    color: #fff;
}

.np-mobile-bar__whatsapp svg {
    flex-shrink: 0;
}

/* ── Animations ──────────────────────────────────────────────── */

@keyframes np-modal-fade-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes np-backdrop-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    dialog.np-lead-dialog,
    dialog.np-lead-dialog::backdrop {
        animation: none;
    }
}
