/* Fix Live Chat image size to match email row height */
.live-chat img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #14bbea;
}
.live-chat {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    font-size: 16px;
    line-height: 1;
    cursor:pointer;
    margin-top: 10px;
}
.live-chat span {
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
}

/* overlay */
.chat-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: none;
    z-index: 999;
}

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 360px;
    max-width: 95%;
    height: 520px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    display: none;
    flex-direction: column;
    z-index: 9999;
}
.chat-widget.active {
    display: flex;
}

.chat-header {
    background: linear-gradient(65deg, #2e3190 0%, #00adef 100%);
    color: #fff;
    padding: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.chat-header h3 {
    margin: 0;
    font-size: 24px;
}
.chat-header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f5f5f5;
}

.bot-msg {
    background: #dbeff8;
    padding: 14px;
    border-radius: 14px;
    max-width: 85%;
    margin-bottom: 12px;
    line-height: 1.6;
}
.user-msg {
    background: #079ade;
    color: #fff;
    padding: 14px;
    border-radius: 14px;
    max-width: 85%;
    margin-left: auto;
    margin-bottom: 12px;
}

.chat-footer {
    display: flex;
    padding: 12px;
    gap: 10px;
    border-top: 1px solid #ddd;
}
.chat-footer input {
    flex: 1;
    height: 45px;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 15px;
}
.chat-footer button {
    background: linear-gradient(65deg, #2e3190 0%, #00adef 100%);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 10px;
    cursor: pointer;
}

.insurance-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}
.insurance-btn {
    width: 100%;
    border: none;
    background: #079ade;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    font-size: 14px;
    transition: 0.3s;
}
.insurance-btn:hover {
    opacity: 0.9;
}

/* ── Tablet & small desktop (576px – 767px) ── */
@media (max-width: 767px) {
    .header {
        height: 70px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 99999;        /* header always on top */
    }
    .header .container {
        height: 70px;
        padding: 0 15px;
    }
    .logo img {
        height: 40px;
    }
    /*body {*/
    /*    padding-top: 70px;*/
    /*}*/

    /* FIX 1: Keep live-chat text visible on mobile */
    .live-chat span {
        display: inline !important;
        font-size: 13px;
    }
    .live-chat img {
        width: 26px !important;
        height: 26px !important;
    }
    .live-chat {
        gap: 5px;
        margin-top: 0;
    }
}

/* ── Mobile (≤ 575px) ── */
@media (max-width: 575px) {

    /* FIX 2: Chat sits BELOW the 70px header, never covers it */
    .chat-widget {
        position: fixed;
        top: 70px;                        /* push down below header */
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: calc(100dvh - 70px);     /* remaining viewport only */
        max-width: none;
        border-radius: 0;
        margin: 0;
        z-index: 9999;                    /* BELOW header's 99999 */
    }

    .chat-header {
        min-height: 60px;
        padding: 12px 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .chat-header h3 {
        font-size: 18px;
        line-height: 1.3;
    }
    .chat-header button {
        font-size: 24px;
    }

    .chat-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 12px;
    }

    .chat-footer {
        padding: 10px;
        background: #fff;
    }
    .chat-footer input {
        height: 45px;
        font-size: 16px;   /* prevents iOS auto-zoom on focus */
    }
    .chat-footer button {
        padding: 0 16px;
    }

    .bot-msg,
    .user-msg {
        max-width: 92%;
        font-size: 14px;
    }
}