.chatbot-container {
    position: fixed !important;
    bottom: 80px !important;
    right: 60px !important;
    left: auto !important;
    z-index: 9999 !important;
}

.chatbot-header-img {
    width: calc(100% - 4px);
    height: auto;
    cursor: pointer;
    display: block;
    transition: opacity 0.3s;
    border-radius: 10px 10px 0 0;
    margin: 2px 2px 0 2px;
}

.chatbot-header-img:hover {
    opacity: 0.9;
}

.chatbot-nps-header {
    background: white;
    padding: 4px;
    border-radius: 10px 10px 0 0;
}

.chatbot-welcome {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.chatbot-avatar {
    width: auto;
    height: auto;
    border-radius: 50%;
    flex-shrink: 0;
}

.chatbot-text {
    background: #91F397;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-left:10px;
    width: 80%;
}

.chatbot-icon {
    width: 80px;
    height: 80px;
    cursor: pointer;
    border-radius: 50%;
    /*box-shadow: 0 4px 12px rgba(0,0,0,0.15);*/
    transition: transform 0.3s;
}

.chatbot-icon:hover {
    transform: scale(1.1);
}

.chatbot-box {
    position: absolute;
    bottom: 105px;
    right: -30px;
    width: 380px;
    height: 480px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: none;
    overflow: visible;
}

.chatbot-box::before {
    content: '';
    display: none;
}

.chatbot-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    z-index: 11;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.chatbot-close-btn:hover {
    color: #007bff;
}

.chatbot-box::after {
    content: url('data:image/svg+xml;utf8,<svg width="37" height="34" viewBox="0 0 37 34" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M0 34V0H37L0 34Z" fill="white"/></svg>');
    position: absolute;
    bottom: -36px;
    right: 20px;
    z-index: 2;
}


.chatbot-box.show {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-border {
    padding: 3px;
    background: linear-gradient(to bottom, #28a745 0%, #d3d3d3 20%, #ff8c00 60%, #d3d3d3 30%, #ff8c00 60%, #007bff 100%);
    border-radius: 12px;
    overflow: visible;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.chatbot-content {
    background: white;
    border-radius: 0 0 10px 10px;
    padding: 10px 0px;
    height: 380px;
    overflow-y: auto;
}

.chatbot-conversation {
    padding: 0px 15px 15px 15px;
    display: flex;
    flex-direction: column;
}

.chatbot-header {
    background: #155AC5 !important;
    color: white !important;
    padding: 10px 15px;
    /*font-weight: 600;*/
    border-radius: 12px;
    margin-bottom: 10px;
    width: 100%;
    align-self: flex-start;
    text-align:center;
}

.chatbot-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 12px;
    max-width: 100%;
    word-wrap: break-word;
    font-size: 14px;
    animation: fadeIn 0.3s;
}

    .chatbot-message.user {
        background: #FA680A;
        color: white;
        margin-left: auto;
        margin-top: 10px;
        text-align: right;
        margin-bottom: 5px;
    }

.chatbot-read {
    font-size: 12px;
    color: #858888;
    text-align: right;
    margin-bottom: 10px;
    margin-right: 10px;
    animation: showRead 0.5s ease 0.3s both;
}

@keyframes showRead {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.chatbot-message.bot {
    background: #f0f0f0;
    color: #333;
    margin-right: auto;
}

.chatbot-bot-response {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.chatbot-bot-response .chatbot-text {
    background: #91F397;
    margin-left: 0;
}


.chatbot-response-menu {
    margin-bottom: 10px;
    animation: fadeIn 0.3s;
}

.chatbot-menu-item {
    background: #f8f9fa;
    border-left: 3px solid #155AC5;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 80%;
}

.chatbot-menu-item:hover {
    background: #e9ecef;
    padding-left: 15px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.chatbot-topic {
    background: white;
    border: 1px solid #155AC5;
    border-radius: 12px;
    padding: 5px 12px;
    margin-bottom: 5px;
    cursor: pointer;
    font-size: 14px;
    color: #155AC5;
}

.chatbot-topic:hover {
    background: #f5f5f5;
    border-color: #007bff;
}

.chatbot-submenu {
    display: none;
    margin-top: 8px;
    padding-left: 10px;
}

.chatbot-submenu.show {
    display: block;
}

.chatbot-submenu-item {
    background: #f8f9fa;
    border-left: 3px solid #007bff;
    padding: 8px 10px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.chatbot-submenu-item:hover {
    background: #e9ecef;
    padding-left: 15px;
}

.chatbot-reset-btn {
    background: #155AC5;
    color: white;
    padding: 8px 10px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    display: block;
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Mobile Portrait */
@media (max-width: 768px) {
    .chatbot-container {
        bottom: 60px !important;
        right: 15px !important;
    }

    .chatbot-icon { 
        margin-right: 30px;
    }

    .chatbot-box {
        width: 90vw;
        max-width: 320px;
        height: 70vh;
        max-height: 475px;
        bottom: 105px;
        right: 15px;
    }

    .chatbot-content {
        height: calc(70vh - 120px);
        max-height: 380px;
    }

    .chatbot-text {
        width: 90%;
    }

    .chatbot-menu-item {
        max-width: 85%;
    }
}

/* Mobile Landscape */
@media (max-width: 1024px) and (orientation: landscape) {
    .chatbot-container {
        bottom: 15px !important;
        right: 90px !important;
    }
     
    .chatbot-icon { 
        margin-right: 10px;
    }
	
    .chatbot-box {
        width: 85vw;
        max-width: 380px;
        height: 70vh;
        max-height: 320px;
        bottom: 105px;
        right: -20px;
    }

    .chatbot-content {
        height: calc(85vh - 120px);
        max-height: 230px;
    }

    .chatbot-message {
        font-size: 13px;
        padding: 6px 10px;
    }

    .chatbot-menu-item {
        font-size: 13px;
        padding: 6px 8px;
        max-width: 80%;
    }

    .chatbot-text {
        font-size: 13px;
        padding: 6px 10px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .chatbot-container {
        bottom: 65px !important;
        right: 10px !important;
    }
     
    .chatbot-box {
        width: 95vw;
        max-width: 300px;
        height: 75vh;
        max-height: 420px;
        bottom: 105px;
        right: 0px;
    }

    .chatbot-content {
        height: calc(75vh - 120px);
        max-height: 330px;
    }

    .chatbot-message {
        font-size: 13px;
    }

    .chatbot-menu-item {
        font-size: 12px;
        max-width: 90%;
    }
}
