/* ===================================================
   Pincus Chat — Widget & Modal
   =================================================== */

/* ---------- Floating bottom-right widget ---------- */
#ppechat-widget {
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 999998;
    width: fit-content;
    min-width: 25vw;
    background: #f5f5f5;
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 20px;
    text-align: center;
    cursor: pointer;
    border: 1px solid #ccc;
    border-bottom: none;
    border-right: none;
    border-top-left-radius: 8px;
    box-shadow: -2px -2px 6px rgba(0,0,0,.15);
    font-family: Arial, Helvetica, sans-serif;
}

#ppechat-widget:hover {
    background: #eaeaea;
}

#ppechat-widget-icon {
    display: inline-block;
    margin-left: 8px;
    font-size: 18px;
    vertical-align: middle;
}

/* Shorter text on narrow screens to reduce line wrapping */
#ppechat-widget-short {
    display: none;
}

/* ---------- Modal overlay ---------- */
#ppechat-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    background: rgba(0,0,0,.6);
}

/* ---------- Modal dialog ---------- */
#ppechat-modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%);
    background: #fff;
    width: 90%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 24px 28px;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

/* ---------- Close button (min 44px tap target) ---------- */
#ppechat-modal-close {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 44px;
    width: 44px;
    height: 44px;
    text-align: center;
    cursor: pointer;
    color: #333;
    padding: 0;
}

#ppechat-modal-close:hover {
    color: #000;
}

/* ---------- Intro paragraph ---------- */
#ppechat-modal-intro {
    margin: 0 0 16px;
}

/* ---------- Tappable links in intro ---------- */
#ppechat-modal-intro a {
    color: #333;
    text-decoration: underline;
}

/* ---------- Ninja Forms overrides inside modal ---------- */
#ppechat-modal-form input[type="text"],
#ppechat-modal-form input[type="email"],
#ppechat-modal-form input[type="tel"],
#ppechat-modal-form textarea,
#ppechat-modal-form select {
    max-width: 100%;
    box-sizing: border-box;
}

/* ---------- Shorten Ninja Forms message textarea ---------- */
#ninja_forms_field_3 {
    height: 5em !important;
}

/* ---------- Body scroll lock when modal is open ---------- */
.ppechat-modal-open {
    overflow: hidden !important;
}

/* ---------- Thank-you message ---------- */
#ppechat-modal-thanks {
    margin: 20px 0;
    font-size: 15px;
}

/* ---------- Responsive: small screens ---------- */
@media (max-width: 480px) {
    /* Tighten modal padding */
    #ppechat-modal {
        padding: 20px 16px;
    }

    /* Show short widget text, hide long version */
    #ppechat-widget-full {
        display: none;
    }
    #ppechat-widget-short {
        display: inline;
    }
}
