/* Chat Assist Panel Styles */

.chat-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    height: 100vh;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: transform 0.3s ease;
}

.chat-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #2c3e50;
    color: white;
    flex-shrink: 0;
}

.chat-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-header-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.chat-header-btn:hover {
    background: rgba(255,255,255,0.25);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 90%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-message.user {
    align-self: flex-end;
    background: #007cba;
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.assistant {
    align-self: flex-start;
    background: #f0f4f8;
    color: #333;
    border-bottom-left-radius: 4px;
}

.chat-message.system {
    align-self: center;
    background: #fff3cd;
    color: #856404;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 8px;
}

.chat-message .insert-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 5px 12px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.chat-message .insert-btn:hover {
    background: #218838;
}

.chat-input-area {
    border-top: 1px solid #e0e0e0;
    padding: 12px;
    flex-shrink: 0;
    background: #fafafa;
}

.chat-suggestions {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.chat-suggestion {
    padding: 4px 10px;
    background: #e8f4fd;
    border: 1px solid #b8daff;
    border-radius: 14px;
    font-size: 12px;
    color: #004085;
    cursor: pointer;
    white-space: nowrap;
}

.chat-suggestion:hover {
    background: #cce5ff;
}

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.chat-input-row textarea {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    font-family: inherit;
    line-height: 1.4;
}

.chat-input-row textarea:focus {
    outline: none;
    border-color: #007cba;
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: #005a87;
}

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

/* Mobile responsive */
@media (max-width: 480px) {
    .chat-panel {
        width: 100vw;
    }
}
