
/* CHAT BOX */
.chat-box {
    display: none;
    flex-direction: column;
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 360px;
    height: 520px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 99999;
}

/* HEADER */
.chat-header {
    background: #0084FF;
    color: white;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.chat-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
.chat-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-avatar img {
    width: 40px;
    height: 40px;
    object-fit: contain; /* FIXES STRETCH */
    border-radius: 50%;
}

.chat-name {
    font-weight: bold;
}

.chat-status {
    font-size: 12px;
    opacity: .8;
}

.chat-close {
    cursor: pointer;
    font-size: 18px;
}

/* MESSAGES (scrollable) */
.chat-messages {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f0f2f5;
}

/* INPUT FIXED */
.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #eee;
    background: white;

    flex-shrink: 0;

    align-items: center;
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
}

.chat-input .send-btn {
    background: #0084FF;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    margin-left: 5px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}
.input-wrapper {
    position: relative;
    flex: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 10px 45px 10px 12px; /* space for emoji button */
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
}

/* MESSAGE ROW */
.msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
    gap: 8px;
    width: 100%; /* 🔥 important */
}
.msg {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}
/* USER (RIGHT SIDE) → reverse order */
.msg.right {
    justify-content: right;
    flex-direction: row-reverse;
    width: 100%; /* 🔥 ensures full stretch */
}
.msg.right .msg-bubble {
    background: #0084FF; /* Messenger blue */
    color: #fff;
    border-top-right-radius: 4px;
    margin-left: auto; /* pushes avatar to extreme right */
}

#chatList {
    padding: 10px;
}
/* ADMIN (LEFT SIDE) */
.msg.left {
    justify-content: flex-start;
    flex-direction: row;
}

/* AVATAR */
.msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* BUBBLE */
.msg-bubble {
    max-width: 70%;
    padding: 10px 12px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.3;
}

/* ADMIN BUBBLE (LEFT) */
.msg.left .msg-bubble {
    background: #e4e6eb;
    color: #000;
    border-top-left-radius: 4px;
}

/* USER BUBBLE (RIGHT) */
.msg.right .msg-bubble {
    background: #0084FF;
    color: white;
    border-top-right-radius: 4px;
}

#emojiPicker {
    position: absolute;
    bottom: 70px;
    right: 10px;
    width: 300px;
    max-height: 350px;
    overflow: hidden;
    display: none;
    z-index: 99999;
}

/* Optional button style */
.emoji-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);

    background: transparent;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    height: auto;
    box-shadow: none;
}

.emoji-btn:hover {
    transform: translateY(-50%) scale(1.1);
    background: transparent;
}

.send-btn {
    background: #0084ff;
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    transition: all .2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

    .send-btn:hover {
    background: #006fd6;
    transform: scale(1.08);
}

    .send-btn:active {
    transform: scale(0.95);
}
    .chat-welcome {
    text-align: center;
    padding: 15px;
}

    #quickQuestions {
    flex-shrink: 0;
    padding: 10px;
}

    .quick-questions button {
    background: #f0f2f5;
    border: none;
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    font-size: 13px;
    transition: 0.2s;
    color:#0084FF;
}

    .quick-questions button:hover {
    background: #e4e6eb;
}
.chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #0084ff; /* Messenger blue */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: 0.3s ease;
    z-index: 9999;
}

.chat-icon:hover {
    transform: scale(1.1);
    background: #006fe0;
}

.chat-icon i {
    font-size: 26px;
}
.chat-auth {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 320px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 20px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.auth-header {
    margin-bottom: 20px;
}

.auth-icon {
    width: 55px;
    height: 55px;
    background: #0084ff;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-size: 24px;
}

.auth-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.auth-header p {
    font-size: 12px;
    color: #777;
    margin-top: 5px;
}

.input-group {
    position: relative;
    margin-bottom: 12px;
}

.input-group i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 10px 10px 10px 35px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

.input-group input:focus {
    border-color: #0084ff;
    box-shadow: 0 0 0 2px rgba(0,132,255,0.15);
}

.auth-btn {
    width: 100%;
    padding: 10px;
    background: #0084ff;
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.auth-btn:hover {
    background: #006fe0;
}

.auth-footer {
    margin-top: 10px;
    font-size: 11px;
    color: #aaa;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* WELCOME MESSAGE */
.welcome-box {
    text-align: center;
    color: white;
    padding: 10px;
    margin-bottom: 10px;
}

.welcome-title {
    font-size: 18px;
    font-weight: bold;
    color: blue;
    margin-bottom: 5px;
}

.welcome-text {
    font-size: 13px;
    opacity: 0.95;
    color: blue;
    
}

/* QUESTIONS CONTAINER */
.questions {
    display: flex;
    flex-direction: column;
    align-items: center;   /* ✅ CENTER HORIZONTALLY */
    gap: 8px;
    padding: 10px;
}

/* QUESTION BUTTON */
.question-btn {
    width: 85%; /* not full width = cleaner look */
    padding: 10px;
    border: none;
    border-radius: 20px;
    background: #f1f5ff;
    cursor: pointer;
    text-align: center;
    transition: 0.2s;
    font-size: 14px;
}

.question-btn:hover {
    background: #007bff;
    color: white;
}
