/* Peptide AI Assistant Pro - Widget Styles (compiled, no build step required) */

:root {
    --pai-primary: #3b82f6;
    --pai-primary-hover: #2563eb;
    --pai-bg-glass: rgba(255, 255, 255, 0.7);
    --pai-border-glass: rgba(255, 255, 255, 0.3);
    --pai-text-main: #1f2937;
    --pai-text-muted: #6b7280;
    --pai-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --pai-radius: 16px;
    --pai-z-index: 999999;
}

.peptide-ai-theme-dark {
    --pai-bg-glass: rgba(17, 24, 39, 0.75);
    --pai-border-glass: rgba(255, 255, 255, 0.1);
    --pai-text-main: #f9fafb;
    --pai-text-muted: #9ca3af;
    --pai-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
}

#peptide-ai-widget-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: var(--pai-z-index);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (max-width: 480px) {
    #peptide-ai-widget-container {
        bottom: 16px;
        right: 16px;
    }
}

#peptide-ai-floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--pai-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--pai-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
#peptide-ai-floating-btn:hover {
    background: var(--pai-primary-hover);
}

#peptide-ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 600px;
    max-height: 80vh;
    background: var(--pai-bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--pai-border-glass);
    border-radius: var(--pai-radius);
    box-shadow: var(--pai-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
}
@media (max-width: 480px) {
    #peptide-ai-chat-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 70px;
    }
}
#peptide-ai-chat-window.peptide-ai-active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.peptide-ai-header {
    padding: 16px;
    border-bottom: 1px solid var(--pai-border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--pai-text-main);
}
.peptide-ai-header .peptide-ai-branding {
    display: flex;
    align-items: center;
    gap: 12px;
}
.peptide-ai-header .peptide-ai-branding h4 {
    margin: 0;
    font-size: 16px;
}
.peptide-ai-header .peptide-ai-branding .peptide-ai-status {
    font-size: 12px;
    color: #10b981;
}
.peptide-ai-header #peptide-ai-close-btn {
    background: none;
    border: none;
    color: var(--pai-text-main);
    font-size: 24px;
    cursor: pointer;
}
.peptide-ai-header #peptide-ai-back-btn {
    background: none;
    border: none;
    color: var(--pai-text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    margin-right: -4px;
    border-radius: 50%;
}
.peptide-ai-header #peptide-ai-back-btn:hover {
    background: rgba(0, 0, 0, 0.06);
}

#peptide-ai-conversation {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    color: var(--pai-text-main);
}
#peptide-ai-conversation::-webkit-scrollbar {
    width: 6px;
}
#peptide-ai-conversation::-webkit-scrollbar-thumb {
    background: var(--pai-border-glass);
    border-radius: 10px;
}

.peptide-ai-welcome-screen h2 {
    margin: 0 0 4px;
}
.peptide-ai-welcome-screen p {
    margin: 0 0 16px;
    color: var(--pai-text-muted);
}
.peptide-ai-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.peptide-ai-qr-btn {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--pai-border-glass);
    color: var(--pai-text-main);
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
}
.peptide-ai-qr-btn:hover {
    background: var(--pai-primary);
    color: #fff;
}

.peptide-ai-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.peptide-ai-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.peptide-ai-msg-user {
    align-self: flex-end;
    background: var(--pai-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.peptide-ai-msg-ai {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.6);
    color: var(--pai-text-main);
    border: 1px solid var(--pai-border-glass);
    border-bottom-left-radius: 4px;
}

.peptide-ai-typing {
    font-style: italic;
    opacity: 0.7;
}

.peptide-ai-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--pai-border-glass);
}
.peptide-ai-footer #peptide-ai-chat-form {
    display: flex;
    gap: 8px;
}
.peptide-ai-footer #peptide-ai-chat-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 20px;
    border: 1px solid var(--pai-border-glass);
    background: rgba(255, 255, 255, 0.5);
    color: var(--pai-text-main);
    outline: none;
}
.peptide-ai-footer #peptide-ai-chat-form input:focus {
    border-color: var(--pai-primary);
}
.peptide-ai-footer #peptide-ai-chat-form button {
    background: var(--pai-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.peptide-ai-footer .peptide-ai-watermark {
    text-align: center;
    font-size: 10px;
    color: var(--pai-text-muted);
    margin-top: 8px;
}

.peptide-ai-hidden {
    display: none !important;
}
