.clinic-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.clinic-chatbot-container.bottom-right {
    bottom: 20px;
    right: 20px;
}

.clinic-chatbot-container.bottom-left {
    bottom: 20px;
    left: 20px;
}

.clinic-chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.clinic-chatbot-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.clinic-chatbot-toggle-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.clinic-chatbot-window {
    position: absolute;
    bottom: 80px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.clinic-chatbot-container.bottom-right .clinic-chatbot-window {
    right: 0;
}

.clinic-chatbot-container.bottom-left .clinic-chatbot-window {
    left: 0;
}

.clinic-chatbot-window.open {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

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

.clinic-chatbot-header {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

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

.clinic-chatbot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    overflow: hidden;
}

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

.clinic-chatbot-name {
    font-weight: 600;
    font-size: 16px;
}

.clinic-chatbot-status {
    font-size: 12px;
    opacity: 0.9;
}

.clinic-chatbot-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

.clinic-chatbot-close svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.clinic-chatbot-consent {
    padding: 12px 16px;
    font-size: 11px;
    line-height: 1.4;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

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

.chatbot-message {
    max-width: 85%;
    animation: fadeIn 0.3s ease-out;
}

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

.chatbot-message.bot {
    align-self: flex-start;
}

.chatbot-message.user {
    align-self: flex-end;
}

.message-content {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chatbot-message.bot .message-content {
    background: #f0f0f1;
    color: #333;
    border-radius: 16px 16px 16px 4px;
}

.chatbot-message.user .message-content {
    border-radius: 16px 16px 4px 16px;
}

.message-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.message-btn {
    padding: 10px 18px;
    border-radius: 20px;
    border: 1px solid;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.message-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-btn.booking-btn,
.message-btn.call-btn {
    border: none;
    font-weight: 600;
}

.message-btn.booking-btn {
    flex: 1;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.message-btn.call-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.clinic-chatbot-input-area {
    padding: 16px 16px 16px 18px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.clinic-chatbot-input {
    flex: 1;
    padding: 10px 10px 10px 11px !important;
    border: 1px solid #ddd;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.clinic-chatbot-input:focus {
    border-color: var(--primary-color, #0073aa);
}

.clinic-chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

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

.clinic-chatbot-send svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f0f0f1;
    border-radius: 16px;
    width: fit-content;
}

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

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

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

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

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

@media (max-width: 480px) {
    .clinic-chatbot-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        border-radius: 12px;
    }
    
    .clinic-chatbot-container.bottom-right {
        right: 10px;
        left: auto;
        bottom: 10px;
    }
    
    .clinic-chatbot-container.bottom-left {
        left: 10px;
        right: auto;
        bottom: 10px;
    }
    
    .clinic-chatbot-container.bottom-right .clinic-chatbot-window {
        right: 0;
        left: auto;
    }
    
    .clinic-chatbot-container.bottom-left .clinic-chatbot-window {
        left: 0;
        right: auto;
    }
    
    .clinic-chatbot-toggle-btn {
        width: 54px;
        height: 54px;
    }
}
