/* Berg-IT Chatbot Widget Styles */

.chatbot-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 99999 !important;
    pointer-events: none;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    transform: none !important;
    will-change: auto !important;
}

.chatbot-widget * {
    pointer-events: auto;
}

.chatbot-widget.bottom-right {
    bottom: 20px;
    right: 20px;
}

.chatbot-widget.bottom-left {
    bottom: 20px;
    left: 20px;
}

.chatbot-widget.chatbot-inline {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    pointer-events: auto;
}

.chatbot-toggle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5d3f 0%, #1e3d2a 100%) !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(45, 93, 63, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 99999 !important;
    position: relative;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 6px 16px rgba(45, 93, 63, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(45, 93, 63, 0.6), 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(45, 93, 63, 0.1);
    }
}

.chatbot-toggle:hover {
    transform: scale(1.15);
    box-shadow: 0 8px 24px rgba(45, 93, 63, 0.5), 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: none;
}

.chatbot-window {
    display: none;
    flex-direction: column;
    width: 380px;
    height: 600px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    z-index: 99998;
    position: relative;
}

.chatbot-inline .chatbot-window {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.chatbot-window-open {
    display: flex !important;
}

.chatbot-header {
    background: linear-gradient(135deg, #2d5d3f 0%, #1e3d2a 100%);
    color: white;
    padding: 1rem 1.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.chatbot-title {
    font-weight: bold;
    font-size: 1.1rem;
}

.chatbot-status {
    font-size: 0.85rem;
    opacity: 0.9;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: #f8f9fa;
}

.chatbot-message {
    max-width: 80%;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    word-wrap: break-word;
    animation: slideIn 0.3s ease-out;
}

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

.chatbot-message-user {
    background: linear-gradient(135deg, #2d5d3f 0%, #1e3d2a 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chatbot-message-bot {
    background: white;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chatbot-typing {
    display: flex;
    gap: 0.3rem;
    padding: 1rem;
}

.chatbot-typing span {
    width: 8px;
    height: 8px;
    background: #999;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.chatbot-typing span:nth-child(1) {
    animation-delay: -0.32s;
}

.chatbot-typing span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.chatbot-input-container {
    padding: 1rem;
    background: white;
    border-top: 1px solid #dee2e6;
    display: flex;
    gap: 0.5rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.7rem 1rem;
    border: 2px solid #dee2e6;
    border-radius: 20px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.3s;
}

.chatbot-input:focus {
    border-color: #2d5d3f;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2d5d3f 0%, #1e3d2a 100%);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

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

.chatbot-send:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
    }
}

.chatbot-hidden {
    display: none !important;
}