/* ================================
   RVNP CHATBOT – BRANDED UI
   Primary: #32a56e
   Secondary: #c1576e
================================ */

#rvnp-chatbot-wrapper {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* ================================
   INPUT AREA (TEXT + SEND BUTTON)
================================ */

/* Input fixed at bottom – ANDROID SAFE */
.input-area {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;

    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* 🔑 prevent wrapping */

    gap: 8px;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    z-index: 5;
}



.input-area input {
    flex: 1;
    height: 42px;              /* 🔑 same height as send button */
    border: none;
    padding: 0 14px;
    font-size: 14px;
    border-radius: 21px;
    background: #f1f5f3;
    outline: none;
}


/* Send button */
.send-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex-shrink: 0;            /* 🔑 prevent shrinking */

    background: #32a56e;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}



/* Floating bubble */
#rvnp-chatbot-bubble {
    width: 60px;
    height: 60px;
    background: #32a56e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0,0,0,.3);
}

/* Chat window */
#rvnp-chatbot {
    width: 340px;
    height: 480px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 35px rgba(0,0,0,.35);
    display: none;
    flex-direction: column;
    margin-bottom: 12px;
    overflow: hidden;
    animation: slideUp .25s ease;
}

#rvnp-chatbot.open {
    display: flex;
}

/* Header */
#rvnp-chatbot header {
    background: #32a56e;
    color: #fff;
    padding: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#rvnp-chatbot header span {
    font-size: 13px;
    opacity: .9;
}

#rvnp-chatbot header button {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}

/* Messages area */
#rvnp-chatbot .messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background: #f2f7f4;
    font-size: 14px;
}

/* User message */
.user-msg {
    background: #dcf5ea;
    color: #222;
    padding: 9px 12px;
    border-radius: 10px 10px 0 10px;
    margin: 6px 0 6px auto;
    max-width: 80%;
    word-wrap: break-word;
}

/* Bot message */
.bot-msg {
    background: #ffffff;
    color: #222;
    padding: 9px 12px;
    border-radius: 10px 10px 10px 0;
    margin: 6px auto 6px 0;
    max-width: 80%;
    word-wrap: break-word;
}

/* Links */
.bot-msg a {
    color: #32a56e;
    text-decoration: none;
    font-weight: 600;
}

.bot-msg a:hover {
    color: #c1576e;
}



/* Quick reply buttons */
.quick-replies {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.quick-replies button {
    background: #32a56e;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
}

.quick-replies button:hover {
    background: #c1576e;
}

/* Animation */
@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}



@media (max-width: 480px) {

    #rvnp-chatbot-wrapper {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        transform: none;
    }

    #rvnp-chatbot {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        display: none;
        flex-direction: column;
        background: #f2f7f4;
    }

    #rvnp-chatbot.open {
        display: flex;
    }

    #rvnp-chatbot.open ~ #rvnp-chatbot-bubble {
        display: none;
    }

    #rvnp-chatbot header {
        padding: 16px;
        min-height: 60px;
        z-index: 5;
    }

    #rvnp-chatbot .messages {
        flex: 1;
        overflow-y: auto;
        padding: 14px;
        padding-bottom: 80px;
        -webkit-overflow-scrolling: touch;
    }

    .input-area {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 10px;
        border-top: 1px solid #ddd;
        z-index: 5;
    }

    #rvnp-chatbot-bubble {
        position: fixed;
        right: 20px;
        bottom: 20px;
        left: auto;
        z-index: 999999;
    }
}
