/* AI Google Sheets Query - Frontend Styles v3.0 */

.aigsq-frontend-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.aigsq-frontend-chatbot {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    overflow: hidden;
}

.aigsq-frontend-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.aigsq-frontend-header h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
}

.aigsq-frontend-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.aigsq-frontend-messages {
    height: 500px;
    overflow-y: auto;
    padding: 20px;
    background: #f9fafb;
}

.aigsq-message {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    animation: fadeIn 0.3s ease;
}

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

.aigsq-message-user {
    flex-direction: row-reverse;
}

.aigsq-message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.aigsq-message-bubble {
    background: white;
    border-radius: 12px;
    padding: 12px 16px;
    max-width: 70%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.aigsq-message-user .aigsq-message-bubble {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.aigsq-message-bubble strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    opacity: 0.8;
}

.aigsq-message-bubble p {
    margin: 0;
    line-height: 1.6;
}

.aigsq-chat-empty {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.aigsq-chat-empty-icon {
    font-size: 60px;
    margin-bottom: 16px;
}

.aigsq-frontend-examples {
    display: flex;
    gap: 8px;
    padding: 16px 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
    flex-wrap: wrap;
    justify-content: center;
}

.aigsq-example-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aigsq-example-btn:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.aigsq-frontend-input-wrapper {
    display: flex;
    gap: 12px;
    padding: 20px;
    background: white;
    border-top: 1px solid #e5e7eb;
}

#aigsq-frontend-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
}

#aigsq-frontend-input:focus {
    outline: none;
    border-color: #667eea;
}

.aigsq-send-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.aigsq-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102,126,234,0.4);
}

.aigsq-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

@media screen and (max-width: 768px) {
    .aigsq-message-bubble {
        max-width: 85%;
    }

    .aigsq-frontend-input-wrapper {
        flex-direction: column;
    }

    .aigsq-send-btn {
        width: 100%;
    }
}
