/* AI Woork GPT Chat Styles */
#ai-woork-chat-container {
    width: 100%;
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#ai-woork-chat-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Welcome Screen */
.ai-woork-welcome {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.ai-woork-welcome-content {
    max-width: 600px;
    width: 100%;
}

.ai-woork-title {
    font-size: 3rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    color: var(--ai-woork-title-color);
    line-height: 1.2;
}

.ai-woork-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 0 0 2rem 0;
    line-height: 1.4;
}

/* Messages Area */
.ai-woork-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: none;
    scroll-behavior: smooth;
}

.ai-woork-messages::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

.ai-woork-messages {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* Message Bubbles */
.ai-woork-message {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.3s ease;
}

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

.ai-woork-message.ai {
    display: flex;
    justify-content: flex-start;
}

.ai-woork-bubble {
    max-width: 80%;
    padding: 1rem 1.5rem;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.ai-woork-message.user .ai-woork-bubble {
    background: var(--ai-woork-user-color);
    color: white;
    border-bottom-right-radius: 4px;
}

.ai-woork-message.ai .ai-woork-bubble {
    background: var(--ai-woork-ai-transparent);
    color: #333;
    border-bottom-left-radius: 4px;
    border: 1px solid #e5e5e5;
}

/* Rich Text Formatting in AI responses */
.ai-woork-bubble h1,
.ai-woork-bubble h2,
.ai-woork-bubble h3 {
    margin: 0.5rem 0;
    font-weight: 600;
}

.ai-woork-bubble h1 {
    font-size: 1.5rem;
}

.ai-woork-bubble h2 {
    font-size: 1.3rem;
}

.ai-woork-bubble h3 {
    font-size: 1.1rem;
}

.ai-woork-bubble p {
    margin: 0.5rem 0;
    font-size: 16px;
    line-height: 1.5;
}

.ai-woork-bubble ul,
.ai-woork-bubble ol {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.ai-woork-bubble li {
    margin: 0.25rem 0;
    font-size: 16px;
}

.ai-woork-bubble strong {
    font-weight: 600;
}

.ai-woork-bubble em {
    font-style: italic;
}

.ai-woork-bubble code {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
}

.ai-woork-bubble pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0.5rem 0;
}

/* Quick Questions */
.ai-woork-quick-questions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.ai-woork-quick-btn {
    background: var(--ai-woork-quick-btn-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ai-woork-quick-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Input Area */
.ai-woork-input-area {
    padding: 1rem;
    border-top: 1px solid #e5e5e5;
    background: white;
}

.ai-woork-input-container {
    max-width: 800px;
    margin: 0 auto;
}

.ai-woork-input-wrapper {
    display: flex;
    align-items: center;
    background: #f8f8f8;
    border-radius: 25px;
    padding: 0.5rem;
    border: 1px solid #e5e5e5;
    transition: border-color 0.2s ease;
}

.ai-woork-input-wrapper:focus-within {
    border-color: var(--ai-woork-user-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.ai-woork-file-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.ai-woork-file-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

.ai-woork-clear-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.1rem;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    color: #666;
}

.ai-woork-clear-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.ai-woork-message-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.8rem;
    font-size: 16px;
    color: #333;
}

.ai-woork-message-input::placeholder {
    color: #999;
}

.ai-woork-send-btn {
    background: var(--ai-woork-user-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.ai-woork-send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.ai-woork-send-btn:not(:disabled):hover {
    background: #005a8b;
    transform: scale(1.05);
}

/* File Preview */
.ai-woork-file-preview {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

.ai-woork-file-remove {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    margin-left: 0.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Loading Animation */
.ai-woork-loading {
    padding: 1rem;
    text-align: center;
}

.ai-woork-loading-dots {
    display: inline-flex;
    gap: 0.3rem;
}

.ai-woork-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--ai-woork-user-color);
    border-radius: 50%;
    animation: ai-woork-bounce 1.4s ease-in-out infinite both;
}

.ai-woork-loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.ai-woork-loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* Error Message */
.ai-woork-error {
    background: #ffe6e6;
    color: #d63031;
    border: 1px solid #ffcccb;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem;
    text-align: center;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ai-woork-bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

/* Chat Active State */
.ai-woork-chat-active .ai-woork-welcome {
    display: none;
}

.ai-woork-chat-active .ai-woork-messages {
    display: block;
}

.ai-woork-chat-active .ai-woork-quick-questions {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .ai-woork-title {
        font-size: 2rem;
    }
    
    .ai-woork-subtitle {
        font-size: 1rem;
    }
    
    .ai-woork-bubble {
        max-width: 90%;
    }
    
    .ai-woork-quick-questions-desktop {
        display: none;
    }
    
    .ai-woork-quick-questions-mobile {
        display: flex;
    }
    
    .ai-woork-quick-btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
    
    /* Prevent zoom on input focus */
    .ai-woork-message-input {
        font-size: 16px;
        transform-origin: left top;
        transition: none;
    }
    
    .ai-woork-message-input:focus {
        font-size: 16px;
    }
}

@media (min-width: 769px) {
    .ai-woork-quick-questions-mobile {
        display: none;
    }
    
    .ai-woork-quick-questions-desktop {
        display: flex;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    #ai-woork-chat-container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .ai-woork-input-wrapper {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .ai-woork-message-input {
        color: #ffffff;
    }
    
    .ai-woork-message-input::placeholder {
        color: #999;
    }
    
    .ai-woork-input-area {
        background: #1a1a1a;
        border-color: #444;
    }
} 