/* Chat Widget Styles */

/* Chat Button */
.chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900 0%, #ec8b00 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s;
    z-index: 1000;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.6);
}

.chat-button.open {
    transform: rotate(90deg);
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    height: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    flex-direction: column;
    z-index: 999;
    animation: slideUp 0.3s ease-out;
}

.chat-window.open {
    display: flex;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #232f3e 0%, #3a4a5e 100%);
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.chat-header-icon {
    font-size: 1.5rem;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #f8f9fa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* Message Bubbles */
.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.chat-message.assistant .chat-message-avatar {
    background: linear-gradient(135deg, #FF9900 0%, #ec8b00 100%);
}

.chat-message.user .chat-message-avatar {
    background: linear-gradient(135deg, #232f3e 0%, #3a4a5e 100%);
}

.chat-message-content {
    max-width: 75%;
}

.chat-message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-message.assistant .chat-message-bubble {
    background: white;
    color: #232f3e;
    border: 1px solid #e0e0e0;
}

.chat-message.user .chat-message-bubble {
    background: linear-gradient(135deg, #FF9900 0%, #ec8b00 100%);
    color: white;
}

.chat-message-time {
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
    padding: 0 4px;
}

/* Recommendations */
.chat-recommendations {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.chat-recommendation {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    transition: all 0.3s;
    cursor: pointer;
}

.chat-recommendation:hover {
    border-color: #FF9900;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(255, 153, 0, 0.2);
}

.chat-recommendation-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-recommendation-label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.chat-recommendation-title {
    font-weight: 600;
    color: #232f3e;
    margin-bottom: 6px;
    font-size: 0.95rem;
}

.chat-recommendation-summary {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.chat-recommendation-reason {
    font-size: 0.8rem;
    color: #FF9900;
    font-style: italic;
    margin-bottom: 8px;
}

.chat-recommendation-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #FF9900;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.3s;
}

.chat-recommendation-link:hover {
    color: #ec8b00;
}

/* Typing Indicator */
.chat-typing {
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-typing-dots {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
}

.chat-typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typingDot 1.4s infinite;
}

.chat-typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.7;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

/* Chat Input */
.chat-input-container {
    padding: 16px;
    border-top: 1px solid #e0e0e0;
    background: white;
    border-radius: 0 0 16px 16px;
}

.chat-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: none;
    max-height: 120px;
    transition: border-color 0.3s;
}

.chat-input:focus {
    outline: none;
    border-color: #FF9900;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF9900 0%, #ec8b00 100%);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s;
    flex-shrink: 0;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 153, 0, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Welcome Message */
.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.chat-welcome-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.chat-welcome-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #232f3e;
    margin-bottom: 8px;
}

.chat-welcome-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.chat-welcome-examples {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.chat-welcome-example {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-welcome-example:hover {
    border-color: #FF9900;
    color: #FF9900;
    transform: translateX(4px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .chat-window {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        max-height: 100vh;
    }
    
    .chat-button {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
        font-size: 24px;
    }
    
    .chat-message-content {
        max-width: 85%;
    }
}

/* Label Colors (matching main app) */
.label-announcement {
    background: linear-gradient(135deg, #E3F2FD 0%, #BBDEFB 100%);
    color: #1976D2;
}

.label-best-practices {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: #388E3C;
}

.label-curation {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFE0B2 100%);
    color: #F57C00;
}

.label-customer-story {
    background: linear-gradient(135deg, #F3E5F5 0%, #E1BEE7 100%);
    color: #7B1FA2;
}

.label-technical-how-to {
    background: linear-gradient(135deg, #E0F2F1 0%, #B2DFDB 100%);
    color: #00796B;
}

.label-thought-leadership {
    background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
    color: #C2185B;
}

/* Chat Proposal Suggestion */
.chat-proposal-suggestion {
    margin-top: 16px;
    padding: 12px;
    background: linear-gradient(135deg, #FFF8E1 0%, #FFECB3 100%);
    border: 1px solid #FFD54F;
    border-radius: 8px;
    text-align: center;
}

.chat-proposal-text {
    font-size: 0.85rem;
    color: #F57F17;
    margin-bottom: 8px;
    font-weight: 500;
}

.chat-proposal-btn {
    background: linear-gradient(135deg, #FF9900 0%, #FF6F00 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(255, 153, 0, 0.2);
}

.chat-proposal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 153, 0, 0.3);
    background: linear-gradient(135deg, #FFB84D 0%, #FF8C1A 100%);
}

.chat-proposal-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 153, 0, 0.2);
}
