/* AI Co-pilot UI */
.ai-copilot-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 350px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    border: 1px solid #e0e0e0;
    max-height: 500px;
}

.ai-copilot-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 8px 8px 0 0;
}

.ai-copilot-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ai-copilot-toggle {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 18px;
    color: #666;
}

.ai-copilot-body {
    padding: 16px;
    overflow-y: auto;
    flex-grow: 1;
}

.ai-copilot-input-area {
    padding: 12px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
    border-radius: 0 0 8px 8px;
}

.ai-textarea {
    width: 100%;
    min-height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-family: inherit;
    font-size: 13px;
    resize: none;
    margin-bottom: 8px;
}

.ai-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    width: 100%;
    transition: opacity 0.2s;
}

.ai-btn:hover {
    opacity: 0.9;
}

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

.ai-settings {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.api-key-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    margin-top: 4px;
}

.ai-result {
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background: #f0f7ff;
    padding: 12px;
    border-radius: 4px;
    border-left: 3px solid #6366f1;
    margin-top: 12px;
    white-space: pre-wrap;
    cursor: pointer;
}

.ai-result:hover {
    background: #e0efff;
}

.ai-result-actions {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.ai-action-btn {
    font-size: 11px;
    padding: 4px 8px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
}

.hidden {
    display: none !important;
}

/* Minimized state */
.ai-copilot-minimized {
    width: auto;
    height: auto;
    bottom: 20px;
    right: 20px;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
}

.ai-copilot-minimized .ai-copilot-header {
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    padding: 10px 16px;
}

.ai-copilot-minimized h3 {
    color: white;
}

.ai-copilot-minimized .ai-copilot-body,
.ai-copilot-minimized .ai-copilot-input-area {
    display: none;
}