/* ========================= */
/* 🔵 Common Base Styles     */
/* ========================= */

#popup {
    position: absolute;
    background: #3e3bf3;
    color: #fff;
    border: none;
    padding: 5px 10px;
    display: none;
    cursor: pointer;
    font-size: 13px;
    font-weight: bold;
    z-index: 9999;
    border-radius: 8px;
}

#bot-icon {
    padding: 5px;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #574cf8;
    border-radius: 25%;
    box-shadow: 0px 0px 12px #574cf8;
}

#bot-icon i {
    font-size: 1.3rem;
}

/* Chat panel container uses flex column layout */
#side-panel-bot {
    display: flex;
    flex-direction: column;
    background: #1c1f23;
    z-index: 1000;
}

/* Header (xcious + close button) */
#side-panel-bot > div:first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* Scrollable chat area */
.chat-body {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 10px;
}

/* Chat messages container */
#chat-log-bot {
    padding-right: 4px;
}

/* Chat input container */
#chat-input-bot {
    display: flex;
    gap: 6px;
}

#chat-input-bot input {
    flex: 1;
    padding: 8px;
    font-size: 14px;
}

#chat-input-bot button {
    padding: 8px 12px;
    background: #007bff;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* ========================= */
/* 💻 Desktop Styles         */
/* ========================= */

@media (min-width: 769px) {
    #side-panel-bot {
        position: fixed;
        top: 56px;
        right: -350px; /* hidden */
        width: 300px;
        height: calc(100vh - 56px);
        padding: 10px;
        /*box-shadow: -2px 0 8px rgba(0, 0, 0, 0.2);*/
        transition: right 0.3s ease-in-out;
    }

    #side-panel-bot.open {
        right: 0;
    }

    #chat-input-bot {
        width: 100%;
    }
}

/* ========================= */
/* 📱 Mobile Styles          */
/* ========================= */

@media (max-width: 768px) {
    #side-panel-bot {
        position: fixed;
        bottom: -100%;
        left: 0;
        right: 0;
        width: 100%;
        height: 50vh;
        padding: 10px;
        /*box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2);*/
        transition: bottom 0.3s ease-in-out;
    }

    #side-panel-bot.open {
        bottom: 0;
    }

    #chat-input-bot {
        width: 100%;
    }
}

/* Drag handle style (mobile only) */
@media (max-width: 768px) {
  #bot-drag-handle {
    width: 50px;
    height: 6px;
    background: #888;
    border-radius: 3px;
    margin: 0 auto 10px auto;
    display: block;
    touch-action: none;
  }
}
