/* Peptide AI Assistant Styles */

.peptide-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Chat Toggle Button */
.chat-toggle-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5eb6ff 0%, #4facfe 100%);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(94, 182, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(94, 182, 255, 0.6);
}

.chat-toggle-btn:active {
    transform: scale(0.95);
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #10b981;
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 10px;
    border: 2px solid white;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(94, 182, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 30px rgba(94, 182, 255, 0.8);
    }
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px;
    height: 600px;
    background: #14191e;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

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

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #1e252d 0%, #14191e 100%);
    padding: 16px 20px;
    border-bottom: 1px solid #232b3a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.chat-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5eb6ff 0%, #4facfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.chat-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #cfe3fb;
}

.chat-status {
    margin: 2px 0 0 0;
    font-size: 12px;
    color: #8a9ba8;
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-actions {
    display: flex;
    gap: 8px;
}

.chat-action-btn {
    background: transparent;
    border: none;
    color: #8a9ba8;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.chat-action-btn:hover {
    background: rgba(94, 182, 255, 0.1);
    color: #5eb6ff;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #0d1117;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
    background: #232b3a;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #2d3744;
}

.message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

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

.ai-message {
    align-items: flex-start;
}

.ai-message .message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #5eb6ff 0%, #4facfe 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.ai-message .message-content {
    background: #1e252d;
    border: 1px solid #232b3a;
    border-radius: 12px 12px 12px 4px;
    padding: 12px 16px;
    max-width: 80%;
}

.ai-message .message-content p {
    margin: 0;
    color: #cfe3fb;
    font-size: 14px;
    line-height: 1.5;
}

.ai-message .message-content ul {
    margin: 8px 0;
    padding-left: 20px;
    color: #cfe3fb;
}

.ai-message .message-content li {
    margin: 4px 0;
    font-size: 14px;
}

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

.user-message .message-content {
    background: linear-gradient(135deg, #5eb6ff 0%, #4facfe 100%);
    border-radius: 12px 12px 4px 12px;
    padding: 12px 16px;
    max-width: 80%;
}

.user-message .message-content p {
    margin: 0;
    color: white;
    font-size: 14px;
    line-height: 1.5;
}

/* Quick Questions */
.quick-questions {
    padding: 12px 16px;
    background: #14191e;
    border-top: 1px solid #232b3a;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quick-q-btn {
    background: #1e252d;
    border: 1px solid #232b3a;
    color: #cfe3fb;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-q-btn:hover {
    background: rgba(94, 182, 255, 0.1);
    border-color: #5eb6ff;
    color: #5eb6ff;
}

/* Chat Input */
.chat-input-container {
    background: #14191e;
    border-top: 1px solid #232b3a;
    padding: 16px;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    background: #1e252d;
    border: 1px solid #232b3a;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s ease;
}

.chat-input-wrapper:focus-within {
    border-color: #5eb6ff;
}

#chat-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #cfe3fb;
    font-size: 14px;
    outline: none;
    padding: 8px 0;
}

#chat-input::placeholder {
    color: #8a9ba8;
}

.send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #5eb6ff 0%, #4facfe 100%);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(94, 182, 255, 0.4);
}

.send-btn:active {
    transform: scale(0.95);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 0;
    align-items: center;
    margin-top: 8px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: #5eb6ff;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.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);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 10px;
        right: 10px;
    }

    .chat-toggle-btn {
        width: 56px;
        height: 56px;
    }

    .quick-q-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}
