/* Claude AI Chatbot Styles */
.claude-chatbot-container {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Position variants */
.claude-chatbot-bottom-right {
    bottom: 20px;
    right: 20px;
}

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

.claude-chatbot-top-right {
    top: 20px;
    right: 20px;
}

.claude-chatbot-top-left {
    top: 20px;
    left: 20px;
}

/* Toggle Button */
.claude-chatbot-toggle {
    position: relative;
    width: 60px;
    height: 60px;
    background: var(--claude-chatbot-primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--claude-chatbot-shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    outline: none;
}

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

.claude-chatbot-toggle .claude-chatbot-icon {
    width: 24px;
    height: 24px;
    color: white;
    transition: all 0.3s ease;
}

.claude-chatbot-toggle .claude-chatbot-close-icon {
    display: none;
}

.claude-chatbot-toggle.open .claude-chatbot-chat-icon {
    display: none;
}

.claude-chatbot-toggle.open .claude-chatbot-close-icon {
    display: block;
}

.claude-chatbot-notification-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background: #ff4444;
    border-radius: 50%;
    border: 2px solid white;
}

/* Chat Widget */
.claude-chatbot-widget {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--claude-chatbot-bg-color);
    border-radius: 12px;
    box-shadow: var(--claude-chatbot-shadow);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--claude-chatbot-border-color);
}

.claude-chatbot-widget.open {
    display: flex;
}

/* For top positions, adjust widget position */
.claude-chatbot-top-right .claude-chatbot-widget,
.claude-chatbot-top-left .claude-chatbot-widget {
    bottom: auto;
    top: 80px;
}

/* For left positions, adjust widget position */
.claude-chatbot-bottom-left .claude-chatbot-widget,
.claude-chatbot-top-left .claude-chatbot-widget {
    right: auto;
    left: 0;
}

/* Header */
.claude-chatbot-header {
    background: var(--claude-chatbot-primary-color);
    color: white;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.claude-chatbot-avatar {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.claude-chatbot-avatar svg {
    width: 18px;
    height: 18px;
    color: white;
}

.claude-chatbot-header-text {
    flex: 1;
}

.claude-chatbot-title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

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

.claude-chatbot-minimize {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.claude-chatbot-minimize:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.claude-chatbot-minimize svg {
    width: 16px;
    height: 16px;
}

/* Messages Area */
.claude-chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

.claude-chatbot-message {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

.claude-chatbot-message-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

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

.claude-chatbot-message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.claude-chatbot-message-bot .claude-chatbot-message-avatar {
    background: var(--claude-chatbot-primary-color);
    color: white;
}

.claude-chatbot-message-user .claude-chatbot-message-avatar {
    background: #6c757d;
    color: white;
}

.claude-chatbot-message-avatar svg {
    width: 14px;
    height: 14px;
}

.claude-chatbot-message-content {
    flex: 1;
}

.claude-chatbot-message-text {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    line-height: 1.4;
    color: var(--claude-chatbot-text-color);
    word-wrap: break-word;
}

.claude-chatbot-message-user .claude-chatbot-message-text {
    background: var(--claude-chatbot-primary-color);
    color: white;
}

.claude-chatbot-message-time {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
    text-align: right;
}

.claude-chatbot-message-user .claude-chatbot-message-time {
    text-align: left;
}

/* Typing Indicator */
.claude-chatbot-typing {
    display: flex;
    gap: 8px;
    padding: 0 16px 16px;
    align-items: flex-end;
}

.claude-chatbot-typing-avatar {
    width: 28px;
    height: 28px;
    background: var(--claude-chatbot-primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.claude-chatbot-typing-avatar svg {
    width: 14px;
    height: 14px;
}

.claude-chatbot-typing-content {
    background: white;
    padding: 12px 16px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

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

.claude-chatbot-typing-text span {
    width: 6px;
    height: 6px;
    background: #6c757d;
    border-radius: 50%;
    animation: claude-typing 1.4s infinite ease-in-out;
}

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

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

@keyframes claude-typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Transfer Notice */
.claude-chatbot-transfer-notice {
    padding: 16px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    margin: 0 16px 16px;
    border-radius: 8px;
}

.claude-chatbot-transfer-text {
    color: #856404;
    font-size: 14px;
    text-align: center;
}

.claude-chatbot-transfer-text strong {
    display: block;
    margin-bottom: 8px;
}

.claude-chatbot-transfer-text p {
    margin: 0;
    font-size: 12px;
}

/* Quick Actions */
.claude-chatbot-quick-actions {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: white;
    border-top: 1px solid var(--claude-chatbot-border-color);
}

.claude-chatbot-quick-action {
    background: #f8f9fa;
    border: 1px solid var(--claude-chatbot-border-color);
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--claude-chatbot-text-color);
}

.claude-chatbot-quick-action:hover {
    background: var(--claude-chatbot-primary-color);
    color: white;
    border-color: var(--claude-chatbot-primary-color);
}

/* Input Area */
.claude-chatbot-input-area {
    border-top: 1px solid var(--claude-chatbot-border-color);
    background: white;
}

.claude-chatbot-input-container {
    display: flex;
    align-items: flex-end;
    padding: 12px 16px;
    gap: 8px;
}

.claude-chatbot-input {
    flex: 1;
    border: 1px solid var(--claude-chatbot-border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 14px;
    resize: none;
    outline: none;
    max-height: 80px;
    min-height: 36px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.claude-chatbot-input:focus {
    border-color: var(--claude-chatbot-primary-color);
}

.claude-chatbot-send-button {
    width: 36px;
    height: 36px;
    background: var(--claude-chatbot-primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    opacity: 0.5;
}

.claude-chatbot-send-button:enabled {
    opacity: 1;
}

.claude-chatbot-send-button:hover:enabled {
    background: var(--claude-chatbot-primary-hover);
    transform: scale(1.05);
}

.claude-chatbot-send-button svg {
    width: 16px;
    height: 16px;
}

.claude-chatbot-powered-by {
    padding: 8px 16px;
    text-align: center;
    font-size: 11px;
    color: #6c757d;
    background: #f8f9fa;
}

.claude-chatbot-powered-by a {
    color: var(--claude-chatbot-primary-color);
    text-decoration: none;
}

.claude-chatbot-powered-by a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    .claude-chatbot-widget {
        width: calc(100vw - 40px);
        height: calc(100vh - 100px);
        max-width: none;
        max-height: none;
    }
    
    .claude-chatbot-container {
        left: 20px !important;
        right: 20px !important;
        bottom: 20px !important;
    }
    
    .claude-chatbot-widget {
        left: 0 !important;
        right: 0 !important;
        bottom: 80px !important;
        top: auto !important;
    }
}

/* Scrollbar Styling */
.claude-chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

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

.claude-chatbot-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.claude-chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* Animation for widget opening */
.claude-chatbot-widget {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.claude-chatbot-widget.open {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Focus styles for accessibility */
.claude-chatbot-toggle:focus,
.claude-chatbot-minimize:focus,
.claude-chatbot-send-button:focus,
.claude-chatbot-quick-action:focus {
    outline: 2px solid var(--claude-chatbot-primary-color);
    outline-offset: 2px;
}

.claude-chatbot-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.2);
}