.chatbot-toggle-wrapper {
    position: fixed;
    bottom: 130px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 2px;
    z-index: 1000;
}

.chatbot-toggle-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #FFD700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.85);
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    animation: chatbotBadgeBlink 1.2s steps(1, end) infinite;
}

.chatbot-toggle-badge:hover {
    transform: translateY(-2px);
}

@keyframes chatbotBadgeBlink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.chatbot-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    border: none;
    background: none;
    outline: none;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease;
}

.chatbot-toggle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chatbot-toggle:hover,
.chatbot-toggle:focus,
.chatbot-toggle:active {
    background: none;
    outline: none;
    transform: translateY(-2px);
}

.chatbot-panel {
    position: fixed;
    bottom: 200px;
    right: 20px;
    width: 340px;
    max-width: calc(100vw - 40px);
    height: 460px;
    max-height: calc(100vh - 200px);
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
}

.chatbot-panel.open {
    display: flex;
    animation: chatbotFadeIn 0.25s ease-out;
}

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

.chatbot-header {
    background-color: #E86020;
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    flex-shrink: 0;
}

.chatbot-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f7f7f8;
}

.chatbot-msg {
    max-width: 85%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chatbot-msg.bot {
    background-color: #fff;
    border: 1px solid #eee;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
    background-color: #E86020;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-msg.error {
    background-color: #fdecea;
    color: #b3261e;
    border: 1px solid #f5c6c3;
    align-self: flex-start;
}

.chatbot-msg.typing {
    background-color: #fff;
    border: 1px solid #eee;
    align-self: flex-start;
    color: #999;
    font-style: italic;
}

.chatbot-input-row {
    display: flex;
    border-top: 1px solid #eee;
    padding: 10px;
    gap: 8px;
    flex-shrink: 0;
}

.chatbot-input-row textarea {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 18px;
    padding: 9px 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
    max-height: 90px;
    line-height: 1.4;
}

.chatbot-input-row textarea:focus {
    border-color: #E86020;
}

.chatbot-send {
    background-color: #E86020;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: background-color 0.2s ease;
}

.chatbot-send:hover {
    background-color: #d35400;
}

.chatbot-send:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .chatbot-panel {
        right: 10px;
        width: calc(100vw - 20px);
    }

    .chatbot-toggle-wrapper {
        right: 10px;
    }
}
