/* TF Claude Chatbot Styles */

#tf-chatbot-widget {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
}

/* Floating bubble */
#tf-chatbot-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: tf-pulse 2s ease-in-out infinite;
}

#tf-chatbot-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#tf-chatbot-bubble.tf-open {
    animation: none;
}

@keyframes tf-pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25); }
    50% { box-shadow: 0 4px 20px rgba(255, 102, 0, 0.5); }
}

/* Chat window */
#tf-chatbot-window {
    position: absolute;
    bottom: 72px;
    right: 0;
    width: 380px;
    height: 500px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
#tf-chatbot-header {
    color: #fff;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

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

/* Messages */
#tf-chatbot-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tf-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    word-wrap: break-word;
}

.tf-msg-user {
    white-space: pre-wrap;
}

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

.tf-msg-bot {
    align-self: flex-start;
    background: #f1f1f1;
    color: #333;
    border-bottom-left-radius: 4px;
}

/* Formatted content in bot messages */
.tf-msg-bot strong {
    font-weight: 700;
}

.tf-msg-bot em {
    font-style: italic;
}

.tf-msg-bot a {
    color: #FF6600;
    text-decoration: underline;
}

.tf-msg-bot a:hover {
    opacity: 0.8;
}

.tf-msg-bot ul {
    margin: 6px 0;
    padding-left: 18px;
    list-style: disc;
}

.tf-msg-bot li {
    margin: 2px 0;
}

/* Typing indicator */
#tf-chatbot-typing {
    padding: 8px 16px;
    display: flex;
    gap: 4px;
    align-items: center;
    flex-shrink: 0;
}

.tf-dot {
    width: 8px;
    height: 8px;
    background: #bbb;
    border-radius: 50%;
    animation: tf-bounce 1.2s infinite;
}

.tf-dot:nth-child(2) { animation-delay: 0.2s; }
.tf-dot:nth-child(3) { animation-delay: 0.4s; }

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

/* Form */
#tf-chatbot-form {
    display: flex;
    padding: 10px;
    gap: 8px;
    border-top: 1px solid #e5e5e5;
    flex-shrink: 0;
}

#tf-chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

#tf-chatbot-input:focus {
    border-color: #FF6600;
}

#tf-chatbot-form button[type="submit"] {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: opacity 0.2s;
}

#tf-chatbot-form button[type="submit"]:hover {
    opacity: 0.85;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #tf-chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }

    #tf-chatbot-widget {
        bottom: 16px;
        right: 16px;
    }
}
