
/* =========================================
   TAGORE ASSISTANT 2.0
   Clean Premium Chatbot Design
   Desktop + Mobile
========================================= */

#tg-chatbot,
#tg-chatbot * {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* Floating chatbot wrapper */
#tg-chatbot {
    position: fixed !important;
    right: 22px !important;
    bottom: 25px !important;
    width: 62px !important;
    height: 62px !important;
    z-index: 999999 !important;
    pointer-events: none !important;
}

/* Floating button */
#tg-chat-toggle {
    position: fixed !important;
    right: 22px !important;
    bottom: 25px !important;

    width: 62px !important;
    height: 62px !important;
    min-width: 62px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border: 3px solid #ffffff !important;
    border-radius: 50% !important;

    background: linear-gradient(135deg, #08a5f5, #0750b5) !important;
    color: #ffffff !important;

    font-size: 27px !important;
    cursor: pointer !important;

    pointer-events: auto !important;
    z-index: 1000000 !important;

    box-shadow: 0 8px 25px rgba(0,50,120,.35);
    touch-action: manipulation;
}

#tg-chat-toggle:hover {
    transform: translateY(-3px);
}

/* Help label */
#tg-chat-label {
    position: fixed !important;
    right: 22px !important;
    bottom: 98px !important;

    z-index: 999999 !important;
    pointer-events: auto !important;

    background: #ffffff !important;
    color: #123c70 !important;

    padding: 11px 16px !important;
    border-radius: 25px !important;

    font-size: 13px !important;
    font-weight: 600 !important;
    white-space: nowrap;

    box-shadow: 0 4px 18px rgba(0,0,0,.13);
}

/* Chat window */
#tg-chat-window {
    position: fixed !important;
    right: 22px !important;
    bottom: 100px !important;

    width: 380px !important;
    height: 550px !important;

    max-width: calc(100vw - 30px) !important;
    max-height: calc(100vh - 125px) !important;

    display: flex;
    flex-direction: column;

    overflow: hidden !important;

    background: #ffffff !important;
    border: 1px solid #dce8f7 !important;
    border-radius: 22px !important;

    box-shadow: 0 18px 55px rgba(8,40,90,.25);

    z-index: 1000001 !important;
    pointer-events: auto !important;
}

/* Hide chat */
#tg-chat-window.tg-chat-hidden {
    display: none !important;
}

/* Header */
#tg-chat-window .tg-chat-header {
    width: 100% !important;
    min-height: 86px !important;

    padding: 14px 18px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    flex-shrink: 0 !important;

    background: linear-gradient(125deg, #092b60, #087de5) !important;
    color: #ffffff !important;
}

.tg-chat-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.tg-chat-logo {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    border-radius: 14px !important;

    background: linear-gradient(135deg, #ffffff, #dcecff) !important;
    color: #0754a6 !important;

    font-size: 25px !important;
    font-weight: 900 !important;

    box-shadow: 0 4px 12px rgba(0,0,0,.15);
}

.tg-chat-header strong {
    display: block !important;
    color: #ffffff !important;
    font-size: 17px !important;
    font-weight: 700 !important;
}

.tg-chat-header small {
    display: block !important;
    margin-top: 6px !important;
    color: #e0efff !important;
    font-size: 11px !important;
}

.tg-online-dot {
    color: #51ed9c !important;
}

.tg-chat-header-actions {
    flex-shrink: 0 !important;
}

.tg-chat-header-actions button {
    width: 35px !important;
    height: 35px !important;

    border: none !important;
    border-radius: 50% !important;

    background: rgba(255,255,255,.16) !important;
    color: #ffffff !important;

    font-size: 23px !important;
    line-height: 1 !important;

    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Messages area */
#tg-chat-messages {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;

    flex: 1 1 auto !important;
    min-height: 0 !important;

    width: 100% !important;
    max-width: 100% !important;

    padding: 18px 15px !important;
    gap: 12px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    background: linear-gradient(180deg, #f5f9ff, #edf4fc) !important;

    text-align: left !important;
}

/* Scrollbar */
#tg-chat-messages::-webkit-scrollbar {
    width: 5px;
}

#tg-chat-messages::-webkit-scrollbar-thumb {
    background: #b9cce1;
    border-radius: 10px;
}

/* Bot messages */
#tg-chat-messages .tg-bot-message {
    display: block !important;

    width: 88% !important;
    max-width: 88% !important;
    min-width: 0 !important;

    align-self: flex-start !important;
    flex: 0 0 auto !important;

    padding: 12px 15px !important;

    border-radius: 15px !important;
    border-bottom-left-radius: 5px !important;

    background: #ffffff !important;
    color: #253b56 !important;

    border: 1px solid #e1eaf5 !important;
    box-shadow: 0 3px 10px rgba(20,60,110,.04);

    font-size: 14px !important;
    line-height: 1.6 !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

/* User messages */
#tg-chat-messages .tg-user-message {
    display: block !important;

    width: fit-content !important;
    max-width: 88% !important;
    min-width: 60px !important;

    align-self: flex-end !important;
    flex: 0 0 auto !important;

    padding: 12px 15px !important;

    border-radius: 15px !important;
    border-bottom-right-radius: 5px !important;

    background: linear-gradient(135deg, #087ce5, #0753b5) !important;
    color: #ffffff !important;

    font-size: 14px !important;
    line-height: 1.6 !important;

    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

/* Menu container */
#tg-chat-messages .tg-chat-menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;

    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;

    flex: 0 0 auto !important;

    gap: 9px !important;
}

/* Menu buttons */
#tg-chat-messages .tg-chat-menu .tg-menu-btn {
    display: block !important;

    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;

    flex: 0 0 auto !important;

    padding: 12px 15px !important;

    border: 1px solid #d5e4f7 !important;
    border-radius: 12px !important;

    background: #ffffff !important;
    color: #124c91 !important;

    font-size: 14px !important;
    font-weight: 600 !important;

    line-height: 1.5 !important;
    text-align: left !important;

    white-space: normal !important;
    overflow-wrap: break-word !important;

    cursor: pointer !important;
    pointer-events: auto !important;

    box-shadow: 0 2px 7px rgba(20,60,110,.04);
    transition: .2s ease;
}

#tg-chat-messages .tg-chat-menu .tg-menu-btn:hover {
    background: #eaf4ff !important;
    border-color: #1684ec !important;
}

/* Main menu button */
#tg-chat-messages .tg-main-menu-btn {
    display: block !important;

    width: fit-content !important;
    max-width: 100% !important;

    padding: 9px 16px !important;

    border: 1px solid #b9d9fa !important;
    border-radius: 22px !important;

    background: #e8f3ff !important;
    color: #075bb5 !important;

    font-size: 13px !important;
    font-weight: 700 !important;

    cursor: pointer !important;
}

/* Link inside bot message */
#tg-chat-messages .tg-bot-message a {
    color: #0878e8 !important;
    font-weight: 700 !important;
    text-decoration: underline !important;
}

/* Input section */
#tg-chat-window .tg-chat-input {
    display: flex !important;
    align-items: center !important;

    width: 100% !important;
    gap: 9px !important;

    padding: 12px 13px !important;

    background: #ffffff !important;
    border-top: 1px solid #e7edf5 !important;

    flex: 0 0 auto !important;
}

#tg-chat-text {
    display: block !important;

    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;

    height: 45px !important;

    padding: 0 16px !important;

    border: 1px solid #dce5ef !important;
    border-radius: 25px !important;

    outline: none !important;

    background: #f8fafc !important;
    color: #26384e !important;

    font-size: 13px !important;
}

#tg-chat-text:focus {
    border-color: #0878e8 !important;
    background: #ffffff !important;
}

/* Send button */
#tg-chat-send {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;

    border: none !important;
    border-radius: 50% !important;

    background: linear-gradient(135deg, #0799ed, #0753b5) !important;
    color: #ffffff !important;

    font-size: 20px !important;
    cursor: pointer !important;
    pointer-events: auto !important;
}

/* Footer */
#tg-chat-window .tg-chat-footer {
    display: block !important;

    width: 100% !important;

    padding: 9px 8px !important;

    text-align: center !important;

    background: #ffffff !important;
    border-top: 1px solid #edf1f6 !important;

    color: #8292a7 !important;
    font-size: 11px !important;

    flex: 0 0 auto !important;
}

/* Mobile design */
@media (max-width: 480px) {

    #tg-chatbot {
        right: 15px !important;
        bottom: 18px !important;
    }

    #tg-chat-toggle {
        right: 15px !important;
        bottom: 18px !important;
    }

    #tg-chat-label {
        right: 15px !important;
        bottom: 92px !important;
        max-width: calc(100vw - 30px) !important;
    }

    #tg-chat-window {
        width: calc(100vw - 30px) !important;
        max-width: calc(100vw - 30px) !important;

        right: 15px !important;
        bottom: 88px !important;

        height: min(570px, calc(100vh - 105px)) !important;
        max-height: calc(100vh - 105px) !important;

        border-radius: 18px !important;
    }

    #tg-chat-messages {
        padding: 15px 12px !important;
        gap: 10px !important;
    }

    #tg-chat-messages .tg-bot-message {
        width: 92% !important;
        max-width: 92% !important;
    }

    #tg-chat-messages .tg-user-message {
        max-width: 90% !important;
    }

    #tg-chat-window .tg-chat-header {
        min-height: 78px !important;
        padding: 12px 15px !important;
    }
}
