.chatbot-widget {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9998;
    font-family: var(--font-primary);
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--charcoal);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    background: var(--primary-gold);
    transform: scale(1.05);
}

.chatbot-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 370px;
    max-height: 520px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: chatbotSlideUp 0.3s ease;
}

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

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

.chatbot-header {
    background: var(--charcoal);
    color: white;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chatbot-avatar img {
    width: 28px;
    height: auto;
}

.chatbot-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.chatbot-status {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
}

.chatbot-status i {
    font-size: 0.5rem;
    color: #10b981;
    margin-right: 3px;
}

.chatbot-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
    transition: color 0.2s;
}

.chatbot-close:hover {
    color: white;
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    max-height: 350px;
    min-height: 280px;
}

.chatbot-message {
    margin-bottom: 14px;
    display: flex;
}

.chatbot-message.bot p {
    background: #f1f3f5;
    color: var(--charcoal);
    padding: 12px 16px;
    border-radius: 0 12px 12px 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 85%;
    margin: 0;
}

.chatbot-message.user {
    justify-content: flex-end;
}

.chatbot-message.user p {
    background: var(--charcoal);
    color: white;
    padding: 12px 16px;
    border-radius: 12px 0 12px 12px;
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 85%;
    margin: 0;
}

/* Form styles */
.chatbot-form {
    margin-top: 10px;
}

.chatbot-field {
    margin-bottom: 12px;
}

.chatbot-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-medium);
    margin-bottom: 4px;
}

.chatbot-field label span {
    color: #e74c3c;
}

.chatbot-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    font-size: 0.88rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s;
}

.chatbot-field input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.chatbot-start-btn {
    width: 100%;
    padding: 12px;
    background: var(--charcoal);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-primary);
    margin-top: 4px;
}

.chatbot-start-btn:hover {
    background: var(--primary-gold);
}

/* Chat input */
.chatbot-input {
    padding: 12px 18px 14px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.chatbot-input-wrapper {
    display: flex;
    gap: 8px;
}

.chatbot-input-wrapper input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 20px;
    font-size: 0.88rem;
    font-family: var(--font-primary);
}

.chatbot-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-gold);
}

.chatbot-input-wrapper button {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--charcoal);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.chatbot-input-wrapper button:hover {
    background: var(--primary-gold);
}

.chatbot-quick-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.quick-action {
    padding: 5px 12px;
    background: #f1f3f5;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    font-size: 0.72rem;
    color: var(--text-medium);
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-primary);
    white-space: nowrap;
}

.quick-action:hover {
    background: var(--champagne);
    border-color: var(--primary-gold);
    color: var(--charcoal);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f1f3f5;
    border-radius: 0 12px 12px 12px;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #999;
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

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

/* Mobile */
@media (max-width: 575px) {
    .chatbot-window {
        width: calc(100vw - 30px);
        right: -10px;
        bottom: 65px;
        max-height: 450px;
    }

    .chatbot-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}
