/* BlueTick AI Chatbot Styles - Enhanced UI */

:root {
    --primary-color: linear-gradient(135deg, #0066FF 0%, #00B8D4 100%);
    --text-color: #1a1a1a;
    --light-bg: #f8f9fa;
    --border-color: #e1e8ed;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

#bluetick-chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Chat Button */
.bluetick-chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.bluetick-chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

.bluetick-chat-button.active {
    transform: scale(0.95);
}

/* Chat Window */
.bluetick-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

.bluetick-chat-window.active {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.bluetick-header {
    background: var(--primary-color);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bluetick-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.bluetick-info h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.bluetick-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 4px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Messages - Enhanced */
.bluetick-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: var(--light-bg);
    scroll-behavior: smooth;
}

.bluetick-messages::-webkit-scrollbar {
    width: 6px;
}

.bluetick-messages::-webkit-scrollbar-track {
    background: transparent;
}

.bluetick-messages::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.bluetick-messages::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.message {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    animation: slideIn 0.3s ease;
    align-items: flex-start;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--light-bg);
}

.message.user .message-avatar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.message-bubble {
    max-width: 75%;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    background: white;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.message.user .message-content {
    background: var(--primary-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.message.bot .message-content {
    border-bottom-left-radius: 4px;
}

.message-time {
    font-size: 11px;
    color: #94a3b8;
    padding: 0 8px;
}

.message.user .message-time {
    text-align: right;
}

/* Links in messages */
.message-content a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.9;
}

.message-content a:hover {
    opacity: 1;
}

/* Typing Indicator - Enhanced */
.typing-message {
    opacity: 0.8;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border-radius: 18px;
    border-bottom-left-radius: 4px;
    box-shadow: var(--shadow-sm);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #94a3b8;
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: 0s;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.quick-action {
    padding: 10px 16px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 13px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.quick-action:hover {
    background: var(--primary-color);
    color: white;
    border-color: transparent;
    transform: translateX(4px);
}

/* Input Area - Enhanced */
.bluetick-input {
    padding: 16px;
    background: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    background: var(--light-bg);
    border-radius: 24px;
    padding: 6px 6px 6px 18px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.input-wrapper:focus-within {
    border-color: #0066FF;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

#chat-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-color);
    font-family: inherit;
    resize: none;
    max-height: 100px;
}

#chat-input::placeholder {
    color: #94a3b8;
}

.send-button {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.3);
}

.send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.4);
}

.send-button:active {
    transform: scale(0.95);
}

.send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Powered By */
.powered-by {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: #94a3b8;
}

.powered-by a {
    color: #0066FF;
    text-decoration: none;
}

.powered-by a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #bluetick-chatbot-container {
        bottom: 10px;
        right: 10px;
    }
    
    .bluetick-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 70px;
        right: -10px;
    }
    
    .bluetick-chat-button {
        width: 56px;
        height: 56px;
    }
}

/* Position variants */
#bluetick-chatbot-container.bottom-left {
    left: 20px;
    right: auto;
}

#bluetick-chatbot-container.bottom-left .bluetick-chat-window {
    left: 0;
    right: auto;
}