/* Chatbot Widget - Pařanský Ráj */

.chatbot-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(99, 102, 241, 0.5);
}

.chatbot-bubble.open {
    transform: scale(0.9);
}

/* Chat window */
.chatbot-window {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 380px;
    height: 500px;
    background: #1a1a2e;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #2d2d44;
}

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

/* Header */
.chatbot-header {
    padding: 14px 16px;
    background: linear-gradient(135deg, #16162a, #1e1e3a);
    border-bottom: 1px solid #2d2d44;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.chatbot-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.chatbot-header-info {
    flex: 1;
}

.chatbot-header-name {
    font-weight: 600;
    color: #e2e8f0;
    font-size: 14px;
}

.chatbot-header-status {
    font-size: 11px;
    color: #94a3b8;
}

.chatbot-close {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}

.chatbot-close:hover {
    color: #e2e8f0;
}

/* Messages area */
.chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: #2d2d44;
    border-radius: 3px;
}

/* Message bubbles */
.chatbot-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chatbot-msg.bot {
    align-self: flex-start;
    background: #2d2d44;
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
}

.chatbot-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border-bottom-right-radius: 4px;
}

/* Typing indicator */
.chatbot-typing {
    align-self: flex-start;
    padding: 12px 16px;
    background: #2d2d44;
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    display: none;
}

.chatbot-typing.visible {
    display: flex;
    gap: 4px;
    align-items: center;
}

.chatbot-typing-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: chatbot-bounce 1.4s ease-in-out infinite;
}

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

.chatbot-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes chatbot-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

/* Input area */
.chatbot-input-area {
    padding: 12px;
    border-top: 1px solid #2d2d44;
    background: #16162a;
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #2d2d44;
    border-radius: 10px;
    background: #1a1a2e;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.chatbot-input:focus {
    border-color: #6366f1;
}

.chatbot-input::placeholder {
    color: #64748b;
}

.chatbot-send {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}

.chatbot-send:hover {
    opacity: 0.9;
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error message */
.chatbot-msg.error {
    align-self: center;
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    font-size: 12px;
    text-align: center;
    max-width: 90%;
}

/* Responsive */
@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    .chatbot-bubble {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}
